summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-07 14:15:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-07 14:15:22 (GMT)
commitff3f6f1a677a780a425ac8b0ab1c45eca92b6ca0 (patch)
treefab8411604ebe16f5b013c4885b79ad0be781f0b /src/H5FD.c
parent35c3c893e84d4a210b4c993ee92b582d07e63109 (diff)
downloadhdf5-ff3f6f1a677a780a425ac8b0ab1c45eca92b6ca0.zip
hdf5-ff3f6f1a677a780a425ac8b0ab1c45eca92b6ca0.tar.gz
hdf5-ff3f6f1a677a780a425ac8b0ab1c45eca92b6ca0.tar.bz2
[svn-r5551] Purpose:
Bug fix. Description: Added extra check to locations where metadata and "small data" blocks were being returned to the file's list of free space to avoid freeing 0-sized blocks. This should fix the problems in last night's daily tests. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index 55661aa..cd16130 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1467,7 +1467,7 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size)
} /* end if */
else {
/* Return the unused portion of the metadata block to a free list */
- if(file->eoma!=0)
+ if(file->eoma!=0 && file->cur_meta_block_size!=0)
if(H5FD_free(file,H5FD_MEM_DEFAULT,file->eoma,file->cur_meta_block_size)<0)
HRETURN_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free metadata block");
@@ -1536,7 +1536,7 @@ H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size)
} /* end if */
else {
/* Return the unused portion of the "small data" block to a free list */
- if(file->eosda!=0)
+ if(file->eosda!=0 && file->cur_sdata_block_size!=0)
if(H5FD_free(file,H5FD_MEM_DRAW,file->eosda,file->cur_sdata_block_size)<0)
HRETURN_ERROR(H5E_VFL, H5E_CANTFREE, HADDR_UNDEF, "can't free 'small data' block");