[PATCH 1/1] trace-event-python.c used malloc without checking ptr if NULL

From: Heloise NH
Date: Tue Sep 29 2015 - 22:03:25 EST


Signed-off-by: Heloise NH <os@xxxxxxxxxxx>
---
tools/perf/util/scripting-engines/trace-event-python.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index cff58ae..14d8e73 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -475,7 +475,7 @@ static int python_start_script(const char *script, int argc, const char **argv)
FILE *fp;

command_line = malloc((argc + 1) * sizeof(const char *));
- if (command_line == NULL){
+ if (command_line == NULL) {
err = -1;
goto error;
}
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/