Fix: unchecked return value of domain_mkdir()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Apr 2018 14:11:34 +0000 (10:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Apr 2018 16:12:29 +0000 (12:12 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index e88d7a2f77eb41534062fbe01dbe990d11f65855..bdc6db89d5e9d303417f992ce2d12dbd4087ed7c 100644 (file)
@@ -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;
                }
                /*
This page took 0.030837 seconds and 4 git commands to generate.