aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter/dfunctions.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-16 23:11:49 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-18 00:28:53 +0000
commit86726f404a60003585d6a5f64f908b091bcac099 (patch)
tree91fa7b0b3c2b80d0cb9efa8cee25d95d5a1a2a4e /epan/dfilter/dfunctions.c
parent0ad15f88ccf434e8210ca64bc99ceeb24a943eb3 (diff)
Trim down the use of ep_ memory in the display filter code.
Couldn't quite eliminate it completely, but it's much improved. Need to figure out where/when to free dfilter_error_msg. Change-Id: I10216e9546d38e83f69991ded8ec0b3fc8472035 Reviewed-on: https://code.wireshark.org/review/6591 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dfilter/dfunctions.c')
-rw-r--r--epan/dfilter/dfunctions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dfilter/dfunctions.c b/epan/dfilter/dfunctions.c
index 0ce74faaae..6394a1e482 100644
--- a/epan/dfilter/dfunctions.c
+++ b/epan/dfilter/dfunctions.c
@@ -46,7 +46,7 @@ string_walk(GList* arg1list, GList **retval, gchar(*conv_func)(gchar))
arg_fvalue = (fvalue_t *)arg1->data;
/* XXX - it would be nice to handle FT_TVBUFF, too */
if (IS_FT_STRING(fvalue_type_ftenum(arg_fvalue))) {
- s = (char *)ep_strdup((gchar *)fvalue_get(arg_fvalue));
+ s = (char *)wmem_strdup(NULL, (gchar *)fvalue_get(arg_fvalue));
for (c = s; *c; c++) {
/**c = g_ascii_tolower(*c);*/
*c = conv_func(*c);
@@ -54,6 +54,7 @@ string_walk(GList* arg1list, GList **retval, gchar(*conv_func)(gchar))
new_ft_string = fvalue_new(FT_STRING);
fvalue_set_string(new_ft_string, s);
+ wmem_free(NULL, s);
*retval = g_list_append(*retval, new_ft_string);
}
arg1 = arg1->next;