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.5.3~19 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6314111ddc8689f0b05ae8ed909498e310935be3;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 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++; }