Skip to content

Commit

Permalink
perf trace/scripting: Check return val of perl_run()
Browse files Browse the repository at this point in the history
The return value from perl_run() is currently ignored, but it
should be checked and used to exit perf if there are problems
loading the script.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
LKML-Reference: <1260867220-15699-4-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Tom Zanussi authored and Ingo Molnar committed Dec 15, 2009
1 parent a3a7cb7 commit 8f11d85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/perf/util/trace-event-perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,11 @@ static int perl_start_script(const char *script, int argc, const char **argv)
goto error;
}

perl_run(my_perl);
if (perl_run(my_perl)) {
err = -1;
goto error;
}

if (SvTRUE(ERRSV)) {
err = -1;
goto error;
Expand Down

0 comments on commit 8f11d85

Please sign in to comment.