mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r10042] Purpose:
bug fix Description: a scale was deleted twice in one case Solution: check for the dimension , delete only for it Platforms tested: linux solaris Misc. update:
This commit is contained in:
parent
c9ff71abe4
commit
b0b4bc02dd
@ -431,8 +431,16 @@ herr_t H5DSattach_scale(hid_t did,
|
||||
dsbuf[nelmts-1] = dsl;
|
||||
|
||||
/* create a new data space for the new references array */
|
||||
if ((sid = H5Screate_simple(1,&nelmts,NULL))<0)
|
||||
dims = (hsize_t*) malloc ( (size_t)nelmts * sizeof (hsize_t));
|
||||
if (dims == NULL)
|
||||
goto out;
|
||||
dims[0] = nelmts;
|
||||
|
||||
if ((sid = H5Screate_simple(1,dims,NULL))<0)
|
||||
goto out;
|
||||
|
||||
if (dims)
|
||||
free(dims);
|
||||
|
||||
/* create the attribute again with the changes of space */
|
||||
if ((aid = H5Acreate(dsid,REFERENCE_LIST,tid,sid,H5P_DEFAULT))<0)
|
||||
@ -712,8 +720,8 @@ herr_t H5DSdetach_scale(hid_t did,
|
||||
if (H5Gget_objinfo(dsid_j,".",TRUE,&sb4)<0)
|
||||
goto out;
|
||||
|
||||
/* same object, reset */
|
||||
if (sb3.fileno==sb4.fileno && sb3.objno==sb4.objno) {
|
||||
/* same object, reset. we want to detach only for this DIM */
|
||||
if (sb3.fileno==sb4.fileno && sb3.objno==sb4.objno && (int)idx==dsbuf[i].dim_idx) {
|
||||
dsbuf[i].ref=0;
|
||||
dsbuf[i].dim_idx=-1;
|
||||
found_dset=1;
|
||||
|
Loading…
Reference in New Issue
Block a user