]> git.saurik.com Git - apple/libpthread.git/commitdiff
libpthread-105.40.1.tar.gz os-x-10105 v105.40.1
authorApple <opensource@apple.com>
Tue, 18 Aug 2015 17:23:49 +0000 (17:23 +0000)
committerApple <opensource@apple.com>
Tue, 18 Aug 2015 17:23:49 +0000 (17:23 +0000)
kern/kern_synch.c

index ca75f6fd678a04c4bb4aa992be531b6bc6466b19..cd698ec2b11bd60636a6eb88e21e7186a337c959 100644 (file)
@@ -1609,6 +1609,7 @@ ksyn_wqfind(user_addr_t uaddr, uint32_t mgen, uint32_t ugen, uint32_t sgen, int
                pthread_list_lock();
                res = ksyn_wq_hash_lookup(uaddr, current_proc(), flags, &kwq, &hashptr, &object, &offset);
                if (res != 0) {
+                       pthread_list_unlock();
                        break;
                }
                if (kwq == NULL && nkwq == NULL) {
@@ -1679,9 +1680,9 @@ ksyn_wqfind(user_addr_t uaddr, uint32_t mgen, uint32_t ugen, uint32_t sgen, int
                                kwq->kw_dropcount++;
                        }
                }
+               pthread_list_unlock();
                break;
        }
-       pthread_list_unlock();
        if (kwqp != NULL) {
                *kwqp = kwq;
        }