Fix: add missing str*dup oom check in sessiond main.c
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Nov 2014 17:18:07 +0000 (12:18 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Nov 2014 20:58:37 +0000 (15:58 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index e8e45115205256fed9cfdface11ae0aaea692268..0a7f56827c0f6c741e6b1fb164b4b1a7bab129a7 100644 (file)
@@ -4672,6 +4672,10 @@ int main(int argc, char **argv)
 
        if (is_root) {
                rundir = strdup(DEFAULT_LTTNG_RUNDIR);
+               if (!rundir) {
+                       ret = -ENOMEM;
+                       goto error;
+               }
 
                /* Create global run dir with root access */
                ret = create_lttng_rundir(rundir);
This page took 0.028667 seconds and 4 git commands to generate.