aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-18 13:11:55 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-18 13:14:11 +0200
commit1e3161a20d5759409fec9aa339f79c5f71cabe65 (patch)
tree08b24a9b71f55d93ced308b08e4f45dfbdeeb3b6 /lib
parentace237ae4ee4a6399f2ab835aea937e6d4471d69 (diff)
polarssl: fix unaligned SSL session-id lock
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/polarssl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index 2ef19a7ca..0be34971e 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -344,13 +344,14 @@ polarssl_connect_step1(struct connectdata *conn,
Curl_ssl_sessionid_lock(conn);
if(!Curl_ssl_getsessionid(conn, &old_session, NULL)) {
ret = ssl_set_session(&connssl->ssl, old_session);
- Curl_ssl_sessionid_unlock(conn);
if(ret) {
+ Curl_ssl_sessionid_unlock(conn);
failf(data, "ssl_set_session returned -0x%x", -ret);
return CURLE_SSL_CONNECT_ERROR;
}
infof(data, "PolarSSL re-using session\n");
}
+ Curl_ssl_sessionid_unlock(conn);
}
ssl_set_ca_chain(&connssl->ssl,