diff options
author | Peter Cao <xcao@hdfgroup.org> | 2010-01-08 19:24:53 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2010-01-08 19:24:53 (GMT) |
commit | 984511ef0ad3d2596ee32cb56594f7d903bbdd90 (patch) | |
tree | b4f7b3cd6069b00c73f4906ee97407365d3c3102 /src/H5HG.c | |
parent | 0ec9ee15c8f3cb3f495e767ccbd9ce52ac1c4d26 (diff) | |
download | hdf5-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/H5HG.c')
-rw-r--r-- | src/H5HG.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |