Skip to content

Commit c5c3814

Browse files
moved udata.grps initialization to avoid memory problem on BAIL
1 parent ddf9866 commit c5c3814

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libhdf5/hdf5open.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2532,6 +2532,10 @@ rec_read_metadata(NC_GRP_INFO_T *grp)
25322532
/* Get HDF5-specific group info. */
25332533
hdf5_grp = (NC_HDF5_GRP_INFO_T *)grp->format_grp_info;
25342534

2535+
/* Set user data for iteration over any child groups. */
2536+
udata.grp = grp;
2537+
udata.grps = nclistnew();
2538+
25352539
/* Open this HDF5 group and retain its grpid. It will remain open
25362540
* with HDF5 until this file is nc_closed. */
25372541
if (!hdf5_grp->hdf_grpid)
@@ -2579,10 +2583,6 @@ rec_read_metadata(NC_GRP_INFO_T *grp)
25792583
iter_index = H5_INDEX_NAME;
25802584
}
25812585

2582-
/* Set user data for iteration over any child groups. */
2583-
udata.grp = grp;
2584-
udata.grps = nclistnew();
2585-
25862586
/* Iterate over links in this group, building lists for the types,
25872587
* datasets and groups encountered. A pointer to udata will be
25882588
* passed as a parameter to the callback function

0 commit comments

Comments
 (0)