Add missing lock in buxton_open_full 66/104966/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141556 accepted/tizen/3.0.m2/tv/20170104.142055 accepted/tizen/3.0.m2/wearable/20170104.142347 accepted/tizen/3.0/common/20161219.113504 accepted/tizen/3.0/ivi/20161219.070756 accepted/tizen/3.0/mobile/20161219.085128 accepted/tizen/3.0/tv/20161219.072411 accepted/tizen/3.0/wearable/20161219.095427 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161216.082724
authorJiwoong Im <jiwoong.im@samsung.com>
Thu, 15 Dec 2016 04:17:32 +0000 (13:17 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Thu, 15 Dec 2016 04:17:32 +0000 (13:17 +0900)
Change-Id: I08921156ff05cccea3af8977f7a5258e64f8f573
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
lib/buxton2.c

index d9d9dd9..af7f5d4 100644 (file)
@@ -2491,8 +2491,10 @@ EXPORT int buxton_open_full(struct buxton_client **client, bool attach_fd,
 
        pthread_mutex_lock(&clients_lock);
        cli = calloc(1, sizeof(*cli));
-       if (!cli)
+       if (!cli) {
+               pthread_mutex_unlock(&clients_lock);
                return -1;
+       }
 
        cli->fd = -1;
        cli->st_callback = callback;