]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: cleanup must free compression methods
authorJay Satiro <raysatiro@yahoo.com>
Fri, 20 May 2016 20:44:01 +0000 (16:44 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 20 May 2016 20:44:01 +0000 (16:44 -0400)
- Free compression methods if OpenSSL 1.0.2 to avoid a memory leak.

Bug: https://github.com/curl/curl/issues/817
Reported-by: jveazey@users.noreply.github.com
lib/vtls/openssl.c

index 6e3335e44125ce217429679557463de089b5a0f3..3a4bde5b34c5254812f5024d756f318d2f52843e 100644 (file)
@@ -747,6 +747,11 @@ void Curl_ossl_cleanup(void)
 
   /* Free all memory allocated by all configuration modules */
   CONF_modules_free();
+
+#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
+    OPENSSL_VERSION_NUMBER <= 0x10002FFFL
+  SSL_COMP_free_compression_methods();
+#endif
 }
 
 /*