Commit 3cda197e authored by Richard Levitte's avatar Richard Levitte
Browse files

Avoid freeing certain things twice.

PR: 43
parent c019099c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);

+1 −0
Original line number Diff line number Diff line
@@ -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);

+1 −0
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -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: