diff options
Diffstat (limited to 'tools/src/h5dump/h5dump.c')
-rw-r--r-- | tools/src/h5dump/h5dump.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index b9e37e8..5267188 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -407,9 +407,10 @@ table_list_add(hid_t oid, unsigned long file_no) } if(init_objs(oid, &info, &table_list.tables[idx].group_table, &table_list.tables[idx].dset_table, &table_list.tables[idx].type_table) < 0) { - H5Idec_ref(oid); - table_list.nused--; - return -1; + if (H5Idec_ref(oid) < 0) { + table_list.nused--; + return -1; + } } #ifdef H5DUMP_DEBUG |