fix memory leak
[openssl.git] / ssl / ssl_lib.c
index 2c691da0b82a2c12df539cea7422cc3fb9a98e11..091195f79040b9f1698f6badb04fdfbb6f8f5d51 100644 (file)
@@ -530,6 +530,10 @@ void SSL_free(SSL *s)
        if (s->ctx) SSL_CTX_free(s->ctx);
 #ifndef OPENSSL_NO_TLSEXT
        if (s->initial_ctx) SSL_CTX_free(s->initial_ctx);
+#ifndef OPENSSL_NO_EC
+       if (s->tlsext_ecpointformatlist) OPENSSL_free(s->tlsext_ecpointformatlist);
+       if (s->tlsext_ellipticcurvelist) OPENSSL_free(s->tlsext_ellipticcurvelist);
+#endif /* OPENSSL_NO_EC */
 #endif
 
        if (s->client_CA != NULL)