From a90bd9795e2b1b82234479b7fec13cad7dae4cd2 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 12:16:19 -0500 Subject: [PATCH] Fix: add missing strdup OOM check Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-relayd/health-relayd.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.34.1