Fix: add missing strdup OOM check
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Nov 2014 17:16:19 +0000 (12:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Nov 2014 19:56:40 +0000 (14:56 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-relayd/health-relayd.c

index 5c4fb50a15154794b76aec6284b3940479baf7ab..af375e26d4b049d5d3d2f0be75c6e302f7a95c10 100644 (file)
@@ -161,6 +161,10 @@ int setup_health_path(void)
 
        if (is_root) {
                rundir = strdup(DEFAULT_LTTNG_RUNDIR);
+               if (!rundir) {
+                       ret = -ENOMEM;
+                       goto end;
+               }
        } else {
                /*
                 * Create rundir from home path. This will create something like
This page took 0.025316 seconds and 4 git commands to generate.