Make DH_free() free up any ex_data and also call the finish method.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 1 Sep 1999 23:50:43 +0000 (23:50 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 1 Sep 1999 23:50:43 +0000 (23:50 +0000)
crypto/dh/dh_lib.c

index ef62262..48b9db2 100644 (file)
@@ -143,6 +143,10 @@ void DH_free(DH *r)
        }
 #endif
 
+       CRYPTO_free_ex_data(dh_meth, (char *)r, &r->ex_data);
+
+       if(r->meth->finish) r->meth->finish(r);
+
        if (r->p != NULL) BN_clear_free(r->p);
        if (r->g != NULL) BN_clear_free(r->g);
        if (r->pub_key != NULL) BN_clear_free(r->pub_key);