summaryrefslogtreecommitdiffstats
path: root/src/H5Rint.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-11-28 04:31:18 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-11-28 04:31:18 (GMT)
commit648073ea8e4cd1b3543073e7b1cbb4bd7e469b44 (patch)
treef327c954c6404b2a007faf44d8546299f2238322 /src/H5Rint.c
parent33a5acf8a5782ea05d3510d48b7b63a017c44a62 (diff)
parent6b68cc352ffabb5fe997db1eb52216b3ee80e669 (diff)
downloadhdf5-648073ea8e4cd1b3543073e7b1cbb4bd7e469b44.zip
hdf5-648073ea8e4cd1b3543073e7b1cbb4bd7e469b44.tar.gz
hdf5-648073ea8e4cd1b3543073e7b1cbb4bd7e469b44.tar.bz2
Merge pull request #2059 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:topic_nullref to develop
* commit '6b68cc352ffabb5fe997db1eb52216b3ee80e669': H5R: fix H5Tconv to check for null references
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r--src/H5Rint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c
index adf6e4e..558c095 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -413,6 +413,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
break;
case H5R_OBJECT1:
case H5R_DATASET_REGION1:
+ break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
HDassert("invalid reference type" && 0);
@@ -423,7 +424,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
} /* end switch */
/* Decrement refcount of attached loc_id */
- if((ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
+ if(ref->type && (ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
done: