moved call to nc4_rec_grp_del() to inside nc4_nc4f_list_del()

This commit is contained in:
Ed Hartnett 2019-07-16 16:29:06 -06:00
parent 4398cad8f5
commit 76d6b55eff
3 changed files with 7 additions and 10 deletions

View File

@ -708,11 +708,6 @@ NC_HDF4_close(int ncid, void *ignore)
if ((retval = hdf4_rec_grp_del(h5->root_grp)))
return retval;
/* Delete all the list contents for vars, dims, and atts, in each
* group. */
if ((retval = nc4_rec_grp_del(h5->root_grp)))
return retval;
/* Close hdf4 file and free HDF4 file info. */
hdf4_file = (NC_HDF4_FILE_INFO_T *)h5->format_file_info;
if (SDend(hdf4_file->sdid))

View File

@ -252,11 +252,6 @@ nc4_close_netcdf4_file(NC_FILE_INFO_T *h5, int abort, NC_memio *memio)
/* Get HDF5 specific info. */
hdf5_info = (NC_HDF5_FILE_INFO_T *)h5->format_file_info;
/* Delete all the list contents for vars, dims, and atts, in each
* group. */
if ((retval = nc4_rec_grp_del(h5->root_grp)))
return retval;
#ifdef USE_PARALLEL4
/* Free the MPI Comm & Info objects, if we opened the file in
* parallel. */

View File

@ -1378,8 +1378,15 @@ nc4_att_list_del(NCindex *list, NC_ATT_INFO_T *att)
int
nc4_nc4f_list_del(NC_FILE_INFO_T *h5)
{
int retval;
assert(h5);
/* Delete all the list contents for vars, dims, and atts, in each
* group. */
if ((retval = nc4_rec_grp_del(h5->root_grp)))
return retval;
/* Cleanup these (extra) lists of all dims, groups, and types. */
nclistfree(h5->alldims);
nclistfree(h5->allgroups);