summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-01-09 22:19:21 +0100
committerGravatar Nikias Bassen2014-01-09 22:19:21 +0100
commit3a03f7fea05d426ca54ea472818c644b9177ad04 (patch)
tree6769c86fc8cc57057430b34961f0fbaf9d86ae7b /src
parent98532b0f1386bcabd8940d0cfd339f76b3341ea8 (diff)
downloadlibimobiledevice-3a03f7fea05d426ca54ea472818c644b9177ad04.tar.gz
libimobiledevice-3a03f7fea05d426ca54ea472818c644b9177ad04.tar.bz2
idevice: free ssl object when SSL handshake fails
Diffstat (limited to 'src')
-rw-r--r--src/idevice.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c
index 26f8ae7..5fa2e85 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -738,6 +738,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection)
return_me = SSL_do_handshake(ssl);
if (return_me != 1) {
debug_info("ERROR in SSL_do_handshake: %s", errorstring(SSL_get_error(ssl, return_me)));
+ SSL_free(ssl);
SSL_CTX_free(ssl_ctx);
} else {
ssl_data_t ssl_data_loc = (ssl_data_t)malloc(sizeof(struct ssl_data_private));