diff options
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index d72fafc1c800..fbd05242b4e5 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
@@ -205,6 +205,9 @@ static void define_event_symbols(struct event_format *event, | |||
205 | const char *ev_name, | 205 | const char *ev_name, |
206 | struct print_arg *args) | 206 | struct print_arg *args) |
207 | { | 207 | { |
208 | if (args == NULL) | ||
209 | return; | ||
210 | |||
208 | switch (args->type) { | 211 | switch (args->type) { |
209 | case PRINT_NULL: | 212 | case PRINT_NULL: |
210 | break; | 213 | break; |
@@ -1091,8 +1094,6 @@ static int python_start_script(const char *script, int argc, const char **argv) | |||
1091 | goto error; | 1094 | goto error; |
1092 | } | 1095 | } |
1093 | 1096 | ||
1094 | free(command_line); | ||
1095 | |||
1096 | set_table_handlers(tables); | 1097 | set_table_handlers(tables); |
1097 | 1098 | ||
1098 | if (tables->db_export_mode) { | 1099 | if (tables->db_export_mode) { |
@@ -1101,6 +1102,8 @@ static int python_start_script(const char *script, int argc, const char **argv) | |||
1101 | goto error; | 1102 | goto error; |
1102 | } | 1103 | } |
1103 | 1104 | ||
1105 | free(command_line); | ||
1106 | |||
1104 | return err; | 1107 | return err; |
1105 | error: | 1108 | error: |
1106 | Py_Finalize(); | 1109 | Py_Finalize(); |