From: Jérémie Galarneau Date: Tue, 3 Apr 2018 14:11:34 +0000 (-0400) Subject: Fix: unchecked return value of domain_mkdir() X-Git-Tag: v2.11.0-rc1~313 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b019620d62206d12b962d99bb1b02186209caa9d;p=lttng-tools.git Fix: unchecked return value of domain_mkdir() Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index e88d7a2f7..bdc6db89d 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4564,9 +4564,12 @@ int cmd_rotate_session(struct ltt_session *session, ret = domain_mkdir(session->ust_session->consumer, session, session->ust_session->uid, session->ust_session->gid); + if (ret) { + ret = -LTTNG_ERR_CREATE_DIR_FAIL; + goto end; + } ret = ust_app_rotate_session(session, &ust_active); if (ret != LTTNG_OK) { - ret = -LTTNG_ERR_CREATE_DIR_FAIL; goto end; } /*