diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-15 03:35:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-02-15 03:35:35 (GMT) |
commit | bbd0b5515888c00ce4ed5f4c7af635d5c9aa2490 (patch) | |
tree | 52ef3ef51a4db6047539fea8ce661da63256416d /src/H5Dchunk.c | |
parent | 50dfe3439bc8e3494dfd08bf4be5997b800f3fad (diff) | |
download | hdf5-bbd0b5515888c00ce4ed5f4c7af635d5c9aa2490.zip hdf5-bbd0b5515888c00ce4ed5f4c7af635d5c9aa2490.tar.gz hdf5-bbd0b5515888c00ce4ed5f4c7af635d5c9aa2490.tar.bz2 |
[svn-r18257] Description:
Bring r18256 from trunk to 1.8 branch:
Bring changes from Coverity fixing branch to trunk:
r18235:
Fixed coverity 114:
if (NULL ==_dest)
H5MM_free(dest);
r18236:
Close Coverity issue #28 (again :-) by working through the logic of the
routine more thoroughly to eliminate the goto statements. (LK & QK)
r18237:
fixed coverity 133:
if (NULL==_dest && NULL==ret_value && NULL != dest)
H5MM_free(dest);
r18238:
Fix coverity items 421 and 422. Added assertion that the heap's free list is
NULL when entering H5HL_fl_deserialize, guarateeing that the free list will
always be linked in even on failure.
r18239:
Fix coverity item 268. Changed H5MM_xfree(read_buf) to read_buf =
H5MM_xfree(read_buf) so that read_buf isn't manipulated after it's been freed.
r18241:
coverity fix: use correct free functon H5FL_FREE()from the previous fix
r18242:
Coverity fix 139: Free dst correctly in H5O_sdspace_copy().
r18243:
Fix Coverity issue #417 by checking for NULL return value from
setup_cache() (LK & QK)
r18244:
Coverity Fix 132: free dest correctly in H5O_efl_copy()
r18245:
Issue 121: H5S_hyper_make_spans() cannot deal with counts of 0. However,
H5Sselect_hyperslab() API does allow a count of 0.
Therefore, simply throw an error if this function encounters a count of 0.
r18246:
Check file_ptr to address coverity issue # 418
r18247:
Fixed coverity 113:
if (sequence)
H5MM_xfree(sequence);
r18248:
Coverity issue #414 by checking for NULL return from setup_cache() (LK & QK)
r18249:
fixed coverity 274: moved H5FL_FREE(H5A_t, attr); to a line above so that if
attr is null, it will not free it.
r18250:
Fix coverity issue #86.
Check return of malloc function to ensure non-null before continuing.
Tested on:
Mac OS X/32 10.6.2 (amazon) w/debug & production)
(h5committested in daily tests on branch)
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 07204a0..ba4f795 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2802,7 +2802,9 @@ H5D_chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to preempt chunk(s) from cache") /* Create a new entry */ - ent = H5FL_MALLOC(H5D_rdcc_ent_t); + if(NULL == (ent = H5FL_MALLOC(H5D_rdcc_ent_t))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate raw data chunk entry") + ent->locked = 0; ent->dirty = FALSE; ent->chunk_addr = chunk_addr; |