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.5.3~26 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=097e97d5b5b6a20d4aab4f66dce4f0bae5c0a689;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 a569c0415..adf8ea994 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -5044,6 +5044,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);