summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/dsa/dsa_lib.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-20 03:07:21 +0000
committerkris <kris@FreeBSD.org>2001-05-20 03:07:21 +0000
commit12896e829e9474d92c70a1528cc64270e9dc08ad (patch)
treeaf21ae7d0d7d432ead379f1689adfee9ffe965f6 /crypto/openssl/crypto/dsa/dsa_lib.c
parent7e55354aa4b06dead79c8a2c91756d71c0f02030 (diff)
downloadFreeBSD-src-12896e829e9474d92c70a1528cc64270e9dc08ad.zip
FreeBSD-src-12896e829e9474d92c70a1528cc64270e9dc08ad.tar.gz
Initial import of OpenSSL 0.9.6a
Diffstat (limited to 'crypto/openssl/crypto/dsa/dsa_lib.c')
-rw-r--r--crypto/openssl/crypto/dsa/dsa_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/openssl/crypto/dsa/dsa_lib.c b/crypto/openssl/crypto/dsa/dsa_lib.c
index be30d18..5dfc0ee 100644
--- a/crypto/openssl/crypto/dsa/dsa_lib.c
+++ b/crypto/openssl/crypto/dsa/dsa_lib.c
@@ -125,13 +125,13 @@ DSA *DSA_new_method(DSA_METHOD *meth)
ret->references=1;
ret->flags=ret->meth->flags;
+ CRYPTO_new_ex_data(dsa_meth,ret,&ret->ex_data);
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
{
+ CRYPTO_free_ex_data(dsa_meth,ret,&ret->ex_data);
OPENSSL_free(ret);
ret=NULL;
}
- else
- CRYPTO_new_ex_data(dsa_meth,ret,&ret->ex_data);
return(ret);
}
@@ -155,10 +155,10 @@ void DSA_free(DSA *r)
}
#endif
- CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data);
-
if(r->meth->finish) r->meth->finish(r);
+ CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data);
+
if (r->p != NULL) BN_clear_free(r->p);
if (r->q != NULL) BN_clear_free(r->q);
if (r->g != NULL) BN_clear_free(r->g);
OpenPOWER on IntegriCloud