From 10837a2a28d0fd2a1ece51f89af286bafd20204a Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 25 Sep 2015 11:29:02 -0500 Subject: [svn-r27876] Description: Make virtual layout return to the property list occur in all cases, even on failure. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel (h5committest not needed on this branch) --- src/H5Pdcpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 5a0e32f..b1ddff0 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -2251,14 +2251,15 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, /* Finish adding entry */ virtual_layout.storage.u.virt.list_nused++; +done: /* Set VDS layout information in property list */ + /* (Even on faliure, so there's not a mangled layout struct in the list) */ if(H5P_poke(plist, H5D_CRT_LAYOUT_NAME, &virtual_layout) < 0) { HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set layout") if(old_list != virtual_layout.storage.u.virt.list) free_list = TRUE; } /* end if */ -done: /* Check if the entry has been partly allocated but not added to the * property list or not included in list_nused */ if(ret_value < 0) { -- cgit v0.12