Update chain building function.
[openssl.git] / ssl / ssl_ciph.c
index 1927969a76decc56c722fb3b05f7285bcc7b1c01..9b37cae38522658752c7d7469760a16d5c2f8c3a 100644 (file)
@@ -1899,6 +1899,18 @@ STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) *meths)
        return old_meths;
        }
 
+static void cmeth_free(SSL_COMP *cm)
+       {
+       OPENSSL_free(cm);
+       }
+
+void SSL_COMP_free_compression_methods(void)
+       {
+       STACK_OF(SSL_COMP) *old_meths = ssl_comp_methods;
+       ssl_comp_methods = NULL;
+       sk_SSL_COMP_pop_free(old_meths, cmeth_free);
+       }
+
 int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
        {
        SSL_COMP *comp;