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>
Wed, 26 Nov 2014 20:35:50 +0000 (15:35 -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 3e04f963329e6603c859164f1ee4ff4207a8e118..4bfbb9ef4faa68e96e41afde465f2716e714bd6b 100644 (file)
@@ -5110,6 +5110,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.02738 seconds and 4 git commands to generate.