From 3a03f7fea05d426ca54ea472818c644b9177ad04 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 9 Jan 2014 22:19:21 +0100 Subject: idevice: free ssl object when SSL handshake fails --- src/idevice.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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)); -- cgit v1.1-32-gdbae