aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorMax Dmitrichenko <dmitrmax@gmail.com>2017-04-19 17:16:28 -0400
committerMichael Mann <mmann78@netscape.net>2017-04-19 22:27:27 +0000
commitd1c0f2b95ad7b5e03305996017635e1cb181c723 (patch)
tree5b0d3442e50af1a2d330a75f722f2d4017524671 /wsutil
parent9e36106bafc4919a46ea7ae27c43d98815dfe9c9 (diff)
Fix memory leak in create_persconffile_profile
found by valgrind Change-Id: I15aef9d78dffac44e36849349dc57b4b36f23de1 Reviewed-on: https://code.wireshark.org/review/21228 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/filesystem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index afaf1d673f..e4f3c3bed8 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -1650,6 +1650,9 @@ create_persconffile_profile(const char *profilename, char **pf_dir_path_return)
}
if (ret == -1)
*pf_dir_path_return = pf_dir_path;
+ else
+ g_free(pf_dir_path);
+
return ret;
}