From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:32:28 +0000 (-0500) Subject: Fix: lttng view.c missing strdup OOM check X-Git-Tag: v2.4.3~14 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=9e54f8bf9c764330637353b7faa4169f2bd7c068 Fix: lttng view.c missing strdup OOM check Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/view.c b/src/bin/lttng/commands/view.c index c2a3c2170..c0ff9d060 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -159,6 +159,9 @@ static char **alloc_argv_from_user_opts(char *opts, const char *trace_path) token = strtok(opts, " "); while (token != NULL) { argv[i] = strdup(token); + if (argv[i] == NULL) { + goto error; + } token = strtok(NULL, " "); i++; }