X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fclient.c;h=a889529a76967f881c9c05159ccdb55300336f51;hb=ba27cd0052c3d29b84b8c157fe5969b6a086f09f;hp=8cf28a9d6323b4859b9563a374422be5489a7484;hpb=6cb45e931e18f489f1eb202396148529d86470a6;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/client.c b/src/bin/lttng-sessiond/client.c index 8cf28a9d6..a889529a7 100644 --- a/src/bin/lttng-sessiond/client.c +++ b/src/bin/lttng-sessiond/client.c @@ -475,7 +475,7 @@ static int create_kernel_session(struct ltt_session *session) ret = kernel_create_session(session, kernel_tracer_fd); if (ret < 0) { ret = LTTNG_ERR_KERN_SESS_FAIL; - goto error; + goto error_create; } /* Code flow safety */ @@ -497,6 +497,7 @@ static int create_kernel_session(struct ltt_session *session) error: trace_kernel_destroy_session(session->kernel_session); session->kernel_session = NULL; +error_create: return ret; } @@ -884,7 +885,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock, if (need_tracing_session) { if (cmd_ctx->session->kernel_session == NULL) { ret = create_kernel_session(cmd_ctx->session); - if (ret < 0) { + if (ret != LTTNG_OK) { ret = LTTNG_ERR_KERN_SESS_FAIL; goto error; }