aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/f_int.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-27 14:50:32 +0100
committerMatt Caswell <matt@openssl.org>2016-06-01 18:00:53 +0100
commitb0cb22b07c71c13412c633c816afb5afccdb84b7 (patch)
treef2aa98d8ca28a016b33de8154704c8e0ef0cd3ee /crypto/asn1/f_int.c
parent6e4ab54b93a161bed3d668315b13359b883caca4 (diff)
downloadopenssl-b0cb22b07c71c13412c633c816afb5afccdb84b7.zip
openssl-b0cb22b07c71c13412c633c816afb5afccdb84b7.tar.gz
openssl-b0cb22b07c71c13412c633c816afb5afccdb84b7.tar.bz2
Free buffer on error in a2i_ASN1_INTEGER()
The function a2i_ASN1_INTEGER() allocates a buffer |s| but then fails to free it on error paths. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/f_int.c')
-rw-r--r--crypto/asn1/f_int.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index 15aece9..0f16ac0 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -148,6 +148,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
return 1;
err:
ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_SHORT_LINE);
+ OPENSSL_free(s);
return 0;
}