Fix consumer pid mutex double-unlock
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 19 Nov 2011 20:47:05 +0000 (15:47 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 19 Nov 2011 20:47:05 +0000 (15:47 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-sessiond/main.c

index d0c1d406863c471cadfb948f43380c9acc62128b..2f80e2cee5fce189453736f49d39b5d78ef3cd4f 100644 (file)
@@ -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;
        }
This page took 0.035576 seconds and 4 git commands to generate.