OpenSSL: Fix memory leak on error path

If SSL_CTX_new(SSLv23_method()) fails, tls_init() error path did not
free the allocated struct tls_data instance.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2016-02-15 21:53:33 +02:00 committed by Jouni Malinen
parent b907491281
commit 1f1e599b3b

View File

@ -941,6 +941,7 @@ void * tls_init(const struct tls_config *conf)
os_free(tls_global);
tls_global = NULL;
}
os_free(data);
return NULL;
}
data->ssl = ssl;