From 5dd93ebcbf912e359029236bb975f06a19147ded Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 13 Jan 2004 13:56:34 -0500 Subject: [svn-r8058] Purpose: Bug fix Description: Plug another small memory leak for fill-values. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest --- release_docs/RELEASE.txt | 4 ++-- src/H5D.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index bef3170..edb2fc4 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -78,11 +78,11 @@ Bug Fixes since HDF5-1.6.1 release Library ------- + - Fixed small internal memory leaks of fill-value information. + QAK - 2004/01/13 - Fixed bug that caused variable-length datatypes (strings or sequences) used for datasets in files with objects that were unlinked to fail to be read/written to a file. QAK - 2004/01/13 - - 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 f7e09ab..08c37c5 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -2420,6 +2420,10 @@ H5D_open_oid(H5G_entry_t *ent, hid_t dxpl_id) ret_value = dataset; done: + /* Release fill value information */ + if (H5O_reset(H5O_FILL_ID, &fill) <0) + HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "unable to release fill-value info") + if (ret_value==NULL && dataset) { if (H5F_addr_defined(dataset->ent.header)) H5O_close(&(dataset->ent)); -- cgit v0.12