aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2016-06-18 17:25:08 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-06-18 17:25:08 -0700
commit6ea24cf79e055f0a62a64baa8587e2254a493c7b (patch)
treec5cd6113ed93854b1bc30cd471c366f080c4be2f /tools/perf/util/scripting-engines/trace-event-python.c
parent540c26087bfbad6ea72758b76b16ae6282a73fea (diff)
parent488326947cd1f038da8d2c9068a0d07b913b7983 (diff)
downloadlinux-6ea24cf79e055f0a62a64baa8587e2254a493c7b.tar.gz
linux-6ea24cf79e055f0a62a64baa8587e2254a493c7b.tar.bz2
linux-6ea24cf79e055f0a62a64baa8587e2254a493c7b.zip
Merge branch 'cec-defines' into for-linus
Let's bring in HDMI CEC defines to ease merging CEC support in the next merge window.
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c7
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,
const char *ev_name,
struct print_arg *args)
{
+ if (args == NULL)
+ return;
+
switch (args->type) {
case PRINT_NULL:
break;
@@ -1091,8 +1094,6 @@ static int python_start_script(const char *script, int argc, const char **argv)
goto error;
}
- free(command_line);
-
set_table_handlers(tables);
if (tables->db_export_mode) {
@@ -1101,6 +1102,8 @@ static int python_start_script(const char *script, int argc, const char **argv)
goto error;
}
+ free(command_line);
+
return err;
error:
Py_Finalize();