diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2012-12-17 00:51:27 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-12-17 01:22:18 +0100 |
commit | b695ccc3e351e589efd30b5ac420bac09d7959d9 (patch) | |
tree | bca9ff1ac2116fe5cb13815bf274c14ae2f12515 /pflocal | |
parent | 27347625c320209e12fdd289305b876ba1f1f94d (diff) | |
download | hurd-b695ccc3e351e589efd30b5ac420bac09d7959d9.tar.gz hurd-b695ccc3e351e589efd30b5ac420bac09d7959d9.tar.bz2 hurd-b695ccc3e351e589efd30b5ac420bac09d7959d9.zip |
Fix double call to pthread_mutex_unlock in S_socket_connect.
* pflocal/socker.c (S_socket_connect): fix redundant call to
pthread_mutex_unlock. There is no need to hold sock->lock to call
connq_connect_cancel, and sock->lock must be taken when leaving the if/else
blocks.
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c index 46749fee..65da7487 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -139,11 +139,11 @@ S_socket_connect (struct sock_user *user, struct addr *addr) sock_free (server); } - pthread_mutex_lock (&sock->lock); if (err) connq_connect_cancel (peer->listen_queue); } + pthread_mutex_lock (&sock->lock); /* We must set CONNECT_QUEUE to NULL, as no one else can set it until we've done so. */ sock->connect_queue = NULL; |