summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-05-30 12:51:16 +0000
committerRichard Levitte <levitte@openssl.org>2002-05-30 12:51:16 +0000
commit3cda197ee338aedc4348564e0b4446d3ef928edb (patch)
treeb338ded88748d370c56847f490c8c0d03f59d7f5 /crypto
parentc019099cb6f4c45584a783d0737d9a413edd0193 (diff)
Avoid freeing certain things twice.
PR: 43
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/d2i_dhp.c1
-rw-r--r--crypto/asn1/d2i_dsap.c1
-rw-r--r--crypto/asn1/d2i_r_pr.c1
-rw-r--r--crypto/dsa/dsa_asn1.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/crypto/asn1/d2i_dhp.c b/crypto/asn1/d2i_dhp.c
index 635ae829db..223ebbbd46 100644
--- a/crypto/asn1/d2i_dhp.c
+++ b/crypto/asn1/d2i_dhp.c
@@ -87,6 +87,7 @@ DH *d2i_DHparams(DH **a, unsigned char **pp, long length)
}
M_ASN1_BIT_STRING_free(bs);
+ bs = NULL;
M_ASN1_D2I_Finish_2(a);
diff --git a/crypto/asn1/d2i_dsap.c b/crypto/asn1/d2i_dsap.c
index 9d4dea6145..a68f35d852 100644
--- a/crypto/asn1/d2i_dsap.c
+++ b/crypto/asn1/d2i_dsap.c
@@ -84,6 +84,7 @@ DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn;
M_ASN1_BIT_STRING_free(bs);
+ bs = NULL;
M_ASN1_D2I_Finish_2(a);
diff --git a/crypto/asn1/d2i_r_pr.c b/crypto/asn1/d2i_r_pr.c
index 6c8a45f821..afd5adb1d8 100644
--- a/crypto/asn1/d2i_r_pr.c
+++ b/crypto/asn1/d2i_r_pr.c
@@ -108,6 +108,7 @@ RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length)
goto err_bn;
M_ASN1_INTEGER_free(bs);
+ bs = NULL;
M_ASN1_D2I_Finish_2(a);
err_bn:
diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c
index a76c8f7c7e..649d17ebe9 100644
--- a/crypto/dsa/dsa_asn1.c
+++ b/crypto/dsa/dsa_asn1.c
@@ -84,6 +84,7 @@ DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length)
if ((ret->s=BN_bin2bn(bs->data,bs->length,ret->s)) == NULL)
goto err_bn;
M_ASN1_BIT_STRING_free(bs);
+ bs = NULL;
M_ASN1_D2I_Finish_2(a);
err_bn: