summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-10-05 14:31:08 (GMT)
committerGitHub <noreply@github.com>2020-10-05 14:31:08 (GMT)
commit5631b2e3fbedd80630e20558bfa89dd530d00214 (patch)
tree44bead02d33bd734c54b4ccb5e8f4ef852b04856
parent9df906126f5d448ad52a98ba99fd2eb2f4b4f5eb (diff)
parentf57cc4a702812b1e0a67cbde407894b58bb31181 (diff)
downloadhdf5-5631b2e3fbedd80630e20558bfa89dd530d00214.zip
hdf5-5631b2e3fbedd80630e20558bfa89dd530d00214.tar.gz
hdf5-5631b2e3fbedd80630e20558bfa89dd530d00214.tar.bz2
Merge pull request #16 from michaelkuhn/fix-plugin-path-leak
Fix memory leak in H5PL__find_plugin_in_path
-rw-r--r--src/H5PLpath.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 1858cf8..3879dc6 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -669,8 +669,10 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
HDstrerror(errno))
/* If it is a directory, skip it */
- if (S_ISDIR(my_stat.st_mode))
+ if (S_ISDIR(my_stat.st_mode)) {
+ path = (char *)H5MM_xfree(path);
continue;
+ }
/* attempt to open the dynamic library as a filter library */
if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)