From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:32:28 +0000 (-0500) Subject: Fix: lttng view.c missing strdup OOM check X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=44721eb2b9db6fc20192aa5d344c25f7255babf4;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 c1a1323e5..cb4b50743 100644 --- a/src/bin/lttng/commands/view.c +++ b/src/bin/lttng/commands/view.c @@ -160,6 +160,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++; }