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.4.3~20 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d3494c130947643d505a212628e060f46296c5e9;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 e8e451152..0a7f56827 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4672,6 +4672,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);