summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
authorPankaj <pankaj.s01@samsung.com>2015-06-03 11:18:26 +0200
committerStef Walter <stefw@redhat.com>2015-06-03 11:18:26 +0200
commitc562aff333bd73a3fe5c15d2969a4ea70300a426 (patch)
tree364991f2db7664c3f403271cbeb581f1451e7132 /p11-kit
parent8768b4611d3268d6fca7fc214ce0a5c7ec7fc332 (diff)
p11-kit: Missing unlock in function rpc_socket_read()
https://bugs.freedesktop.org/show_bug.cgi?id=90827
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/rpc-transport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/p11-kit/rpc-transport.c b/p11-kit/rpc-transport.c
index b3651ad..913e054 100644
--- a/p11-kit/rpc-transport.c
+++ b/p11-kit/rpc-transport.c
@@ -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;
}