Merge branch 'patch-3' of https://github.com/gsjaardema/netcdf-c into consolidate-gh

This commit is contained in:
Ward Fisher 2016-07-15 14:37:55 -06:00
commit 9fde5ed227

View File

@ -1987,12 +1987,12 @@ write_nc3_strict_att(hid_t hdf_grpid)
BAIL(NC_EFILEMETA);
exit:
if (spaceid && (H5Sclose(spaceid) < 0))
if (spaceid > 0 && (H5Sclose(spaceid) < 0))
BAIL2(NC_EFILEMETA);
#ifdef EXTRA_TESTS
num_spaces--;
#endif
if (attid && (H5Aclose(attid) < 0))
if (attid > 0 && (H5Aclose(attid) < 0))
BAIL2(NC_EFILEMETA);
return retval;
}