summaryrefslogtreecommitdiffstats
path: root/src/H5HFsection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HFsection.c')
-rw-r--r--src/H5HFsection.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/H5HFsection.c b/src/H5HFsection.c
index 152f15a..102dc7c 100644
--- a/src/H5HFsection.c
+++ b/src/H5HFsection.c
@@ -490,7 +490,6 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
H5HF_indirect_t *parent, unsigned par_entry)
{
H5HF_free_section_t *sect = NULL; /* 'Single' free space section to add */
- hbool_t par_incr = FALSE; /* Indicate that parent iblock has been incremented */
H5HF_free_section_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_single_new)
@@ -509,7 +508,6 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
if(sect->u.single.parent) {
if(H5HF_iblock_incr(sect->u.single.parent) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
- par_incr = TRUE;
} /* end if */
sect->u.single.par_entry = par_entry;
@@ -518,13 +516,6 @@ H5HF_sect_single_new(hsize_t sect_off, size_t sect_size,
done:
if(!ret_value && sect) {
- /* Check if we should decrement parent ref. count */
- if(par_incr) {
- HDassert(sect->u.single.parent);
- if(H5HF_iblock_decr(sect->u.single.parent) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, NULL, "can't decrement reference count on parent indirect block")
- } /* end if */
-
/* Release the section */
(void)H5FL_FREE(H5HF_free_section_t, sect);
} /* end if */
@@ -2291,7 +2282,6 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
unsigned nentries)
{
H5HF_free_section_t *sect = NULL; /* 'Indirect' free space section to add */
- hbool_t iblock_incr = FALSE; /* Indicate that parent iblock has been incremented */
H5HF_free_section_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HF_sect_indirect_new)
@@ -2314,7 +2304,6 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
sect->u.indirect.u.iblock->max_rows;
if(H5HF_iblock_incr(sect->u.indirect.u.iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared indirect block")
- iblock_incr = TRUE;
} /* end if */
else {
sect->u.indirect.u.iblock_off = iblock_off;
@@ -2338,13 +2327,8 @@ H5HF_sect_indirect_new(H5HF_hdr_t *hdr, haddr_t sect_off, hsize_t sect_size,
done:
if(!ret_value && sect) {
- /* Check if we should decrement parent ref. count */
- if(iblock_incr)
- if(H5HF_iblock_decr(sect->u.indirect.u.iblock) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTDEC, NULL, "can't decrement reference count on shared indirect block")
-
/* Release the section */
- (void)H5FL_FREE(H5HF_free_section_t, sect);
+ sect = H5FL_FREE(H5HF_free_section_t, sect);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)