From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:16:19 +0000 (-0500) Subject: Fix: add missing strdup OOM check X-Git-Tag: v2.6.0-rc4~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aaa4618487f38c5cf69a63c6bcf3430b62cb9720;p=lttng-tools.git 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 8a5cbdfcb..8194c3e4b 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -160,6 +160,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