diff options
author | Peter Cao <xcao@hdfgroup.org> | 2010-01-08 19:17:59 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2010-01-08 19:17:59 (GMT) |
commit | 11e943f0776878e4e6fa860208aa17b6770c7ba3 (patch) | |
tree | 013b2c61b6aa82d6af6e8b942d9b13b5d1e73f45 /src/H5HFdblock.c | |
parent | 3794f9a78a122ed2515541b5507ce3b633884db0 (diff) | |
download | hdf5-11e943f0776878e4e6fa860208aa17b6770c7ba3.zip hdf5-11e943f0776878e4e6fa860208aa17b6770c7ba3.tar.gz hdf5-11e943f0776878e4e6fa860208aa17b6770c7ba3.tar.bz2 |
[svn-r18081] fix coverity 26 , check (dblik->parent) before calls H5HF_man_iblock_detach().
line, and those below, will be ignored--
M src/H5HFdblock.c
Diffstat (limited to 'src/H5HFdblock.c')
-rw-r--r-- | src/H5HFdblock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index c4b7630..af4713e 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -324,8 +324,11 @@ HDfprintf(stderr, "%s: Reversing iterator\n", FUNC); #endif /* 0 */ /* Detach from parent indirect block */ - if(H5HF_man_iblock_detach(dblock->parent, dxpl_id, dblock->par_entry) < 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block") + + if(dblock->parent) { + if(H5HF_man_iblock_detach(dblock->parent, dxpl_id, dblock->par_entry) < 0) + HGOTO_ERROR(H5E_HEAP, H5E_CANTATTACH, FAIL, "can't detach from parent indirect block"); + } dblock->parent = NULL; dblock->par_entry = 0; } /* end else */ |