From 0709e00e61462b464263cf01f6f84690e35aff07 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Wed, 29 Jun 2016 11:07:27 -0400 Subject: [PATCH] Fix: check return value of config_document_replace_element Signed-off-by: Jonathan Rajotte --- src/bin/lttng/commands/create.c | 6 ++++++ 1 file changed, 6 insertions(+) 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")) { -- 2.34.1