aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-09-11 22:19:31 +0200
committerMichael Mann <mmann78@netscape.net>2016-09-12 01:33:38 +0000
commit032a6ac3be243c2bbf4b5d1010065a14b7784ddb (patch)
treee40fc390263685107f2651265eabcea10a0b2d5c /epan
parent71c41a0a13f9825d71e08e5bc03700275287f096 (diff)
Fix memleaks in capture file dialog
Tried to poke various fields (including the capture filter field), this revealed some memleaks. Change-Id: I1eca431a09839906a4b3c902ad85e55bffc71ca8 Reviewed-on: https://code.wireshark.org/review/17648 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dfilter/dfilter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c
index 3e1d558828..98f16a8f71 100644
--- a/epan/dfilter/dfilter.c
+++ b/epan/dfilter/dfilter.c
@@ -235,6 +235,7 @@ dfilter_compile(const gchar *text, dfilter_t **dfp, gchar **err_msg)
}
if (df_lex_init(&scanner) != 0) {
+ wmem_free(NULL, expanded_text);
*dfp = NULL;
if (err_msg != NULL)
*err_msg = g_strdup_printf("Can't initialize scanner: %s",
@@ -398,6 +399,7 @@ FAILURE:
if (*err_msg == NULL)
*err_msg = g_strdup_printf("Unable to parse filter string \"%s\".", expanded_text);
}
+ wmem_free(NULL, expanded_text);
*dfp = NULL;
return FALSE;
}