]> granicus.if.org Git - p11-kit/commitdiff
p11-kit: Missing unlock in function rpc_socket_read()
authorPankaj <pankaj.s01@samsung.com>
Wed, 3 Jun 2015 09:18:26 +0000 (11:18 +0200)
committerStef Walter <stefw@redhat.com>
Wed, 3 Jun 2015 09:18:26 +0000 (11:18 +0200)
https://bugs.freedesktop.org/show_bug.cgi?id=90827

p11-kit/rpc-transport.c

index b3651ad43f360d087f3ba113cc7e64f385e8b7ad..913e054d029f7ff0fc8e9536aceb12f44cddf4c2 100644 (file)
@@ -360,8 +360,10 @@ rpc_socket_read (rpc_socket *sock,
        p11_mutex_lock (&sock->read_lock);
 
        if (!sock->read_creds) {
-               if (read_all (sock->fd, &dummy, 1) != 1)
+               if (read_all (sock->fd, &dummy, 1) != 1) {
+                       p11_mutex_unlock (&sock->read_lock);
                        return CKR_DEVICE_ERROR;
+               }
                sock->read_creds = true;
        }