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:22:58 +0000 (15:22 -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 a569c04155a05fe23e61cc8596028771332c8995..adf8ea99458235c7d4c042588c3d82288ffafbd4 100644 (file)
@@ -5044,6 +5044,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.027241 seconds and 4 git commands to generate.