diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-20 21:37:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-20 21:37:12 (GMT) |
commit | 47c3bc7540869f53f0b734c68d3289835f0a546d (patch) | |
tree | 90e688dc21b095d9d3d36e944465ac79eff05348 /src/H5HFtiny.c | |
parent | b2012d9f74843ec87b31b7aca0c3ad8b6b6fe448 (diff) | |
download | hdf5-47c3bc7540869f53f0b734c68d3289835f0a546d.zip hdf5-47c3bc7540869f53f0b734c68d3289835f0a546d.tar.gz hdf5-47c3bc7540869f53f0b734c68d3289835f0a546d.tar.bz2 |
[svn-r19272] Description:
Close out various resource leaks and usages of uninitialized memory that
were flagged by valgrind. [There's still some more valgrind warnings, but
it's better now... :-/ ]
Also clean up warnings and code formatting.
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug & valgrind
(h5committest forthcoming)
Diffstat (limited to 'src/H5HFtiny.c')
-rw-r--r-- | src/H5HFtiny.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c index ce91bd1..f11b6c0 100644 --- a/src/H5HFtiny.c +++ b/src/H5HFtiny.c @@ -178,6 +178,9 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size); *id++ = enc_obj_size & H5HF_TINY_MASK_EXT_2; } /* end else */ HDmemcpy(id, obj, obj_size); +#ifdef H5_CLEAR_MEMORY +HDmemset(id + obj_size, 0, (hdr->id_len - (1 + hdr->tiny_len_extended + obj_size))); +#endif /* H5_CLEAR_MEMORY */ /* Update statistics about heap */ hdr->tiny_size += obj_size; |