From: Mathieu Desnoyers Date: Sat, 19 Nov 2011 20:47:05 +0000 (-0500) Subject: Fix consumer pid mutex double-unlock X-Git-Tag: v2.0-pre15~94 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=3ff2ecac2dec345eacceb0e350c08c5c657c0a30;p=lttng-tools.git Fix consumer pid mutex double-unlock Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c index d0c1d4068..2f80e2cee 100644 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@ -3007,8 +3007,9 @@ static int process_client_msg(struct command_ctx *cmd_ctx) ret = LTTCOMM_KERN_CONSUMER_FAIL; goto error; } + } else { + pthread_mutex_unlock(&kconsumer_data.pid_mutex); } - pthread_mutex_unlock(&kconsumer_data.pid_mutex); } break; case LTTNG_DOMAIN_UST: @@ -3033,8 +3034,9 @@ static int process_client_msg(struct command_ctx *cmd_ctx) } ust_consumer_fd = ustconsumer_data.cmd_sock; + } else { + pthread_mutex_unlock(&ustconsumer_data.pid_mutex); } - pthread_mutex_unlock(&ustconsumer_data.pid_mutex); } break; }