summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2010-01-08 19:24:53 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2010-01-08 19:24:53 (GMT)
commit984511ef0ad3d2596ee32cb56594f7d903bbdd90 (patch)
treeb4f7b3cd6069b00c73f4906ee97407365d3c3102 /src
parent0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26 (diff)
downloadhdf5-984511ef0ad3d2596ee32cb56594f7d903bbdd90.zip
hdf5-984511ef0ad3d2596ee32cb56594f7d903bbdd90.tar.gz
hdf5-984511ef0ad3d2596ee32cb56594f7d903bbdd90.tar.bz2
[svn-r18085]
fixed coverity #27, check if (heap) before use heap->obj....
Diffstat (limited to 'src')
-rw-r--r--src/H5HG.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5HG.c b/src/H5HG.c
index b4662eb..ace07ce 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -800,7 +800,8 @@ H5HG_link (H5F_t *f, hid_t dxpl_id, const H5HG_t *hobj, int adjust)
} /* end if */
/* Set return value */
- ret_value=heap->obj[hobj->idx].nrefs;
+ if (heap)
+ ret_value=heap->obj[hobj->idx].nrefs;
done:
if (heap && H5AC_unprotect(f, dxpl_id, H5AC_GHEAP, hobj->addr, heap, heap_flags)<0)