tools lib traceevent: test correct variable after allocation
[cascardo/linux.git] / tools / lib / traceevent / event-parse.c
index 5a824e3..7538a1f 100644 (file)
@@ -2481,7 +2481,7 @@ process_dynamic_array(struct event_format *event, struct print_arg *arg, char **
 
        free_token(token);
        arg = alloc_arg();
-       if (!field) {
+       if (!arg) {
                do_warning("%s: not enough memory!", __func__);
                *tok = NULL;
                return EVENT_ERROR;