ltt-sessiond: fix 2 double-unlock
[lttng-tools.git] / ltt-sessiond / main.c
index 77497d570b68e3e10aaf2a2386321ac66bd55d8c..094fe4adf75fd68b80cfed7e3665309340efc753 100644 (file)
@@ -609,7 +609,7 @@ static int update_kernel_stream(int fd)
                                DBG("Channel found, updating kernel streams");
                                ret = kernel_open_channel_stream(channel);
                                if (ret < 0) {
-                                       goto end;
+                                       goto error;
                                }
 
                                /*
@@ -620,20 +620,20 @@ static int update_kernel_stream(int fd)
                                        ret = send_kconsumerd_channel_fds(session->kernel_session->consumer_fd,
                                                        channel);
                                        if (ret < 0) {
-                                               goto end;
+                                               goto error;
                                        }
                                }
-                               goto end;
+                               goto error;
                        }
                }
                unlock_session(session);
        }
+       unlock_session_list();
+       return ret;
 
-end:
+error:
+       unlock_session(session);
        unlock_session_list();
-       if (session) {
-               unlock_session(session);
-       }
        return ret;
 }
 
This page took 0.025021 seconds and 4 git commands to generate.