mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
moved call to nc4_rec_grp_del() to inside nc4_nc4f_list_del()
This commit is contained in:
parent
4398cad8f5
commit
76d6b55eff
@ -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))
|
||||
|
@ -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. */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user