summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobbie Harwood <rharwood@redhat.com>2015-10-29 17:28:14 -0400
committerSimo Sorce <simo@redhat.com>2015-10-29 17:51:06 -0400
commit461a5fa9f91a2753ebeef6323a64239c35e2f250 (patch)
tree2c1e266da35fc22220ab8ef11bc4311b4315489d
parent959309797916214cc4f0cd8832bcdbcc3d62dc0c (diff)
downloadgss-proxy-461a5fa9f91a2753ebeef6323a64239c35e2f250.tar.gz
gss-proxy-461a5fa9f91a2753ebeef6323a64239c35e2f250.tar.xz
gss-proxy-461a5fa9f91a2753ebeef6323a64239c35e2f250.zip
Fix potential deadlock on socket grab
Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r--proxy/src/client/gpm_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/proxy/src/client/gpm_common.c b/proxy/src/client/gpm_common.c
index 93d6c24..cb4ccdb 100644
--- a/proxy/src/client/gpm_common.c
+++ b/proxy/src/client/gpm_common.c
@@ -130,9 +130,7 @@ static int gpm_grab_sock(struct gpm_ctx *gpmctx)
ret = gpm_open_socket(gpmctx);
}
- if (ret) {
- pthread_mutex_unlock(&gpmctx->lock);
- }
+ pthread_mutex_unlock(&gpmctx->lock);
return ret;
}