aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r--tools/lib/traceevent/parse-filter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c
index ab9cefe320b4..246ee81e1f93 100644
--- a/tools/lib/traceevent/parse-filter.c
+++ b/tools/lib/traceevent/parse-filter.c
@@ -109,7 +109,11 @@ static enum event_type read_token(char **tok)
109 (strcmp(token, "=") == 0 || strcmp(token, "!") == 0) && 109 (strcmp(token, "=") == 0 || strcmp(token, "!") == 0) &&
110 pevent_peek_char() == '~') { 110 pevent_peek_char() == '~') {
111 /* append it */ 111 /* append it */
112 *tok = malloc_or_die(3); 112 *tok = malloc(3);
113 if (*tok == NULL) {
114 free_token(token);
115 return EVENT_ERROR;
116 }
113 sprintf(*tok, "%c%c", *token, '~'); 117 sprintf(*tok, "%c%c", *token, '~');
114 free_token(token); 118 free_token(token);
115 /* Now remove the '~' from the buffer */ 119 /* Now remove the '~' from the buffer */
@@ -1123,6 +1127,8 @@ process_filter(struct event_format *event, struct filter_arg **parg,
1123 break; 1127 break;
1124 case EVENT_NONE: 1128 case EVENT_NONE:
1125 break; 1129 break;
1130 case EVENT_ERROR:
1131 goto fail_alloc;
1126 default: 1132 default:
1127 goto fail_print; 1133 goto fail_print;
1128 } 1134 }