From: Mathieu Desnoyers Date: Wed, 26 Nov 2014 17:18:07 +0000 (-0500) Subject: Fix: add missing str*dup oom check in sessiond main.c X-Git-Tag: v2.6.0-rc4~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ec7ef06ebab243809679f3f643730f5755331514;p=lttng-tools.git Fix: add missing str*dup oom check in sessiond main.c Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 590df85b6..e69ae0d45 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -5104,6 +5104,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);