diff --git a/src/H5P.c b/src/H5P.c index 06f2c104d5..1e73eaff79 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -1617,6 +1617,7 @@ herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) { int i; + hsize_t real_dims[H5O_LAYOUT_NDIMS]; /* Full-sized array to hold chunk dims */ H5D_layout_t layout; FUNC_ENTER(H5Pset_chunk, FAIL); @@ -1639,11 +1640,14 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no chunk dimensions specified"); } + /* Initialize chunk dims to 0s */ + HDmemset(real_dims,0,H5O_LAYOUT_NDIMS*sizeof(hsize_t)); for (i=0; iprops[loc]) + if(prop==plist->props[loc]) { + /* Jump over the property we are deleting */ plist->props[loc]=prop->next; + + /* Free the property, ignoring return value, nothing we can do */ + H5P_free_prop(prop); + } /* end if */ else { /* Set up initial pointers */ prev=tprop=plist->props[loc];