From: Jonathan Rajotte Date: Wed, 29 Jun 2016 15:07:27 +0000 (-0400) Subject: Fix: check return value of config_document_replace_element X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=0709e00e61462b464263cf01f6f84690e35aff07 Fix: check return value of config_document_replace_element Signed-off-by: Jonathan Rajotte --- diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c index fe9488b96..5fdcbe3d2 100644 --- a/src/bin/lttng/commands/create.c +++ b/src/bin/lttng/commands/create.c @@ -773,6 +773,12 @@ static int create_session_from_template(struct config_document *template, } + if (ret) { + ERR("%s", lttng_strerror(ret)); + ret = CMD_ERROR; + goto error; + } + /* Shm path */ if (shm_path && config_document_element_exist(template, "/sessions/session/shared_memory_path")) {