diff options
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index ad17855528f9..5ea4326ad11f 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c | |||
@@ -209,7 +209,16 @@ static void free_arg(struct filter_arg *arg) | |||
209 | switch (arg->type) { | 209 | switch (arg->type) { |
210 | case FILTER_ARG_NONE: | 210 | case FILTER_ARG_NONE: |
211 | case FILTER_ARG_BOOLEAN: | 211 | case FILTER_ARG_BOOLEAN: |
212 | break; | ||
213 | |||
212 | case FILTER_ARG_NUM: | 214 | case FILTER_ARG_NUM: |
215 | free_arg(arg->num.left); | ||
216 | free_arg(arg->num.right); | ||
217 | break; | ||
218 | |||
219 | case FILTER_ARG_EXP: | ||
220 | free_arg(arg->exp.left); | ||
221 | free_arg(arg->exp.right); | ||
213 | break; | 222 | break; |
214 | 223 | ||
215 | case FILTER_ARG_STR: | 224 | case FILTER_ARG_STR: |
@@ -218,6 +227,12 @@ static void free_arg(struct filter_arg *arg) | |||
218 | free(arg->str.buffer); | 227 | free(arg->str.buffer); |
219 | break; | 228 | break; |
220 | 229 | ||
230 | case FILTER_ARG_VALUE: | ||
231 | if (arg->value.type == FILTER_STRING || | ||
232 | arg->value.type == FILTER_CHAR) | ||
233 | free(arg->value.str); | ||
234 | break; | ||
235 | |||
221 | case FILTER_ARG_OP: | 236 | case FILTER_ARG_OP: |
222 | free_arg(arg->op.left); | 237 | free_arg(arg->op.left); |
223 | free_arg(arg->op.right); | 238 | free_arg(arg->op.right); |