Fix: lttng view.c missing strdup OOM check
[lttng-tools.git] / src / bin / lttng / commands / view.c
index c1a1323e5790732a198ca7b77b59c4dabf33df3c..cb4b5074361ebbfe62cbbb83e01812353430b613 100644 (file)
@@ -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++;
        }
This page took 0.024077 seconds and 5 git commands to generate.