X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fclient.c;h=a889529a76967f881c9c05159ccdb55300336f51;hp=8cf28a9d6323b4859b9563a374422be5489a7484;hb=5d0a7bcb4407e434e2278ce3a7be2c30d00c3313;hpb=6cb45e931e18f489f1eb202396148529d86470a6 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; }