From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:16:19 +0000 (-0500) Subject: Fix: add missing strdup OOM check X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=b6ab01aa1d1c2c4936e19968de1878f2833014b3 Fix: add missing strdup OOM check Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 5c4fb50a1..af375e26d 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -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