mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-24 15:25:00 +08:00
Fix for HDFFFV-10308. Initialize hid_ts in function check_objects and
check for id > -1 before calling close functions.
This commit is contained in:
parent
d5acbfeb9e
commit
e92f3f858b
@ -707,9 +707,9 @@ done:
|
|||||||
*/
|
*/
|
||||||
static int check_objects(const char* fname, pack_opt_t *options) {
|
static int check_objects(const char* fname, pack_opt_t *options) {
|
||||||
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */
|
||||||
hid_t fid;
|
hid_t fid = -1;
|
||||||
hid_t did;
|
hid_t did = -1;
|
||||||
hid_t sid;
|
hid_t sid = -1;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int uf;
|
unsigned int uf;
|
||||||
trav_table_t *travt = NULL;
|
trav_table_t *travt = NULL;
|
||||||
@ -810,8 +810,11 @@ static int check_objects(const char* fname, pack_opt_t *options) {
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
H5E_BEGIN_TRY {
|
H5E_BEGIN_TRY {
|
||||||
|
if (sid > -1)
|
||||||
H5Sclose(sid);
|
H5Sclose(sid);
|
||||||
|
if (did > -1)
|
||||||
H5Dclose(did);
|
H5Dclose(did);
|
||||||
|
if (fid > -1)
|
||||||
H5Fclose(fid);
|
H5Fclose(fid);
|
||||||
} H5E_END_TRY;
|
} H5E_END_TRY;
|
||||||
if (travt)
|
if (travt)
|
||||||
|
Loading…
Reference in New Issue
Block a user