]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix memory leak on error path
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 15 Feb 2016 19:53:33 +0000 (21:53 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 15 Feb 2016 19:53:33 +0000 (21:53 +0200)
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>
src/crypto/tls_openssl.c

index e34a3d075996f5e143f9eaa1b04b84705df010b2..e53b1b64187b40f62b66de9de86f6a186643dbff 100644 (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;