From 56bf3cb4d3c9290e71180b7699a77f84a7f8c509 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 6 Jan 2004 13:44:36 -0500 Subject: [svn-r8027] Purpose: Bug fix Description: Fix small memory leak of fill-value information inside the library. Solution: "reset" the fill-value object header message, so that the internal buffer gets freed. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest --- release_docs/RELEASE.txt | 2 ++ src/H5D.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index bcbba1f..2c3ad62 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -71,6 +71,8 @@ Bug Fixes since HDF5-1.6.1 release Library ------- + - Fixed small internal memory leak of fill-value information. + QAK - 2004/01/06 - Detect situation where szip 'pixels per block' is larger than the fastest changing dimension of a dataset's chunk size and disallow this (due to limits in szip library). QAK - 2003/12/31 diff --git a/src/H5D.c b/src/H5D.c index 5125a08..53aa0ec 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -1538,6 +1538,10 @@ H5D_update_entry_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, H5P_genplist_t *p HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message"); done: + /* Release fill value information */ + if (H5O_reset(H5O_FILL_ID, &fill) <0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to release fill-value info") + /* Release pointer to object header itself */ if(ent!=NULL && oh!=NULL) if(H5O_unprotect(ent,oh, dxpl_id)<0) -- cgit v0.12