diff options
Diffstat (limited to 'epan/dfilter/dfilter-macro.c')
-rw-r--r-- | epan/dfilter/dfilter-macro.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c index ed2f245374..fef1f2c561 100644 --- a/epan/dfilter/dfilter-macro.c +++ b/epan/dfilter/dfilter-macro.c @@ -318,8 +318,7 @@ static const gchar* dfilter_macro_apply_recurse(const gchar* text, guint depth, *error = "end of filter in the middle of a macro expression"; goto on_error; } case ';': { - g_ptr_array_add(args,arg->str); - g_string_free(arg,FALSE); + g_ptr_array_add(args,g_string_free(arg,FALSE)); arg = g_string_sized_new(32); break; @@ -337,10 +336,9 @@ static const gchar* dfilter_macro_apply_recurse(const gchar* text, guint depth, break; } case '}': { const gchar* resolved; - g_ptr_array_add(args,arg->str); + g_ptr_array_add(args,g_string_free(arg,FALSE)); g_ptr_array_add(args,NULL); - g_string_free(arg,FALSE); arg = NULL; resolved = dfilter_macro_resolve(name->str, (gchar**)args->pdata, error); |