summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-02 10:39:36 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-02 10:39:36 (GMT)
commiteea7c11b6acd1d193046736466be73beaf8f8faa (patch)
tree292abb04058e7cb907f3030f02996d45e070bc6d /test
parent7b603397c3a5f604da2ef8cdc3cab0eb27780a34 (diff)
downloadhdf5-eea7c11b6acd1d193046736466be73beaf8f8faa.zip
hdf5-eea7c11b6acd1d193046736466be73beaf8f8faa.tar.gz
hdf5-eea7c11b6acd1d193046736466be73beaf8f8faa.tar.bz2
Fix unfreed memory after fork in vfd_swmr test
The writer configuration in the vfd_swmr test was not freed in the child process after a call to fork() causing a memory leak.
Diffstat (limited to 'test')
-rw-r--r--test/vfd_swmr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c
index d49629f..b140813 100644
--- a/test/vfd_swmr.c
+++ b/test/vfd_swmr.c
@@ -1237,6 +1237,10 @@ test_reader_md_concur(void)
if(HDclose(child_pfd[0]) < 0)
HDexit(EXIT_FAILURE);
+ /* Free unused configuration */
+ if(config_writer)
+ HDfree(config_writer);
+
/*
* Case A: reader
* --verify an empty index
@@ -2167,6 +2171,10 @@ test_disable_enable_eot_concur(void)
if(HDclose(child_pfd[0]) < 0)
HDexit(EXIT_FAILURE);
+ /* Free unused configuration */
+ if(config_writer)
+ HDfree(config_writer);
+
/*
* Open the file 3 times as VFD SWMR reader
* Enable and disable EOT for a file
@@ -2440,6 +2448,10 @@ test_file_end_tick_concur(void)
if(HDclose(child_pfd[0]) < 0)
HDexit(EXIT_FAILURE);
+ /* Free unused configuration */
+ if(config_writer)
+ HDfree(config_writer);
+
/*
* Open the file 3 times as VFD SWMR reader
* Trigger EOT for the files