diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-12-29 22:55:13 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-12-29 22:55:13 +0000 |
commit | 244956f84310c31e741df14762f0157f61f9964c (patch) | |
tree | 88b42679a88d0d4c4a8545b115c4794b95f5076b /epan/dfilter/dfunctions.c | |
parent | 84792dd971f28d62a2f1e285c7d385447510865c (diff) |
use an ep allocated temporary string when creating the string for a FT_STRING value and call fvalue_set with already_copied==FALSE so the string gets allocated in ftype-string.c instead
svn path=/trunk/; revision=20239
Diffstat (limited to 'epan/dfilter/dfunctions.c')
-rw-r--r-- | epan/dfilter/dfunctions.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dfilter/dfunctions.c b/epan/dfilter/dfunctions.c index 485ab5bc4d..5a44c9d1c8 100644 --- a/epan/dfilter/dfunctions.c +++ b/epan/dfilter/dfunctions.c @@ -34,6 +34,7 @@ #include <ftypes/ftypes.h> #include <epan/exceptions.h> +#include <epan/emem.h> /* lowercase an ASCII character. * (thanks to Guy Harris for the function) */ @@ -65,14 +66,14 @@ string_walk(GList* arg1list, GList **retval, gchar(*conv_func)(gchar)) arg_fvalue = arg1->data; switch (fvalue_ftype(arg_fvalue)->ftype) { case FT_STRING: - s = g_strdup(fvalue_get(arg1->data)); + s = ep_strdup(fvalue_get(arg1->data)); for (c = s; *c; c++) { /**c = string_ascii_to_lower(*c);*/ *c = conv_func(*c); } new_ft_string = fvalue_new(FT_STRING); - fvalue_set(new_ft_string, s, TRUE); + fvalue_set(new_ft_string, s, FALSE); *retval = g_list_append(*retval, new_ft_string); break; |