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.6.0-rc4~24 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a4c2661b54e430a3aef8ce0f93c34ba7fb047a64;p=lttng-tools.git 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 de7211718..3c9975fa9 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++; }