diff options
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 27088c55af1b..a776ed5cd2b4 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -2186,10 +2186,10 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char ** | |||
2186 | 2186 | ||
2187 | value = arg_eval(arg); | 2187 | value = arg_eval(arg); |
2188 | if (value == NULL) | 2188 | if (value == NULL) |
2189 | goto out_free; | 2189 | goto out_free_field; |
2190 | field->value = strdup(value); | 2190 | field->value = strdup(value); |
2191 | if (field->value == NULL) | 2191 | if (field->value == NULL) |
2192 | goto out_free; | 2192 | goto out_free_field; |
2193 | 2193 | ||
2194 | free_arg(arg); | 2194 | free_arg(arg); |
2195 | arg = alloc_arg(); | 2195 | arg = alloc_arg(); |
@@ -2197,14 +2197,14 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char ** | |||
2197 | free_token(token); | 2197 | free_token(token); |
2198 | type = process_arg(event, arg, &token); | 2198 | type = process_arg(event, arg, &token); |
2199 | if (test_type_token(type, token, EVENT_OP, "}")) | 2199 | if (test_type_token(type, token, EVENT_OP, "}")) |
2200 | goto out_free; | 2200 | goto out_free_field; |
2201 | 2201 | ||
2202 | value = arg_eval(arg); | 2202 | value = arg_eval(arg); |
2203 | if (value == NULL) | 2203 | if (value == NULL) |
2204 | goto out_free; | 2204 | goto out_free_field; |
2205 | field->str = strdup(value); | 2205 | field->str = strdup(value); |
2206 | if (field->str == NULL) | 2206 | if (field->str == NULL) |
2207 | goto out_free; | 2207 | goto out_free_field; |
2208 | free_arg(arg); | 2208 | free_arg(arg); |
2209 | arg = NULL; | 2209 | arg = NULL; |
2210 | 2210 | ||
@@ -2218,6 +2218,8 @@ process_fields(struct event_format *event, struct print_flag_sym **list, char ** | |||
2218 | *tok = token; | 2218 | *tok = token; |
2219 | return type; | 2219 | return type; |
2220 | 2220 | ||
2221 | out_free_field: | ||
2222 | free_flag_sym(field); | ||
2221 | out_free: | 2223 | out_free: |
2222 | free_arg(arg); | 2224 | free_arg(arg); |
2223 | free_token(token); | 2225 | free_token(token); |