From b371a682fb67ff945a8095437b9b33cab549bb49 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Thu, 13 Oct 2016 15:57:25 +0800 Subject: Update to openssl 1.0.2j Signed-off-by: Gary Lin --- Cryptlib/OpenSSL/crypto/asn1/f_enum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Cryptlib/OpenSSL/crypto/asn1/f_enum.c') diff --git a/Cryptlib/OpenSSL/crypto/asn1/f_enum.c b/Cryptlib/OpenSSL/crypto/asn1/f_enum.c index 591c3b57..94cd54db 100644 --- a/Cryptlib/OpenSSL/crypto/asn1/f_enum.c +++ b/Cryptlib/OpenSSL/crypto/asn1/f_enum.c @@ -160,8 +160,6 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) i * 2); if (sp == NULL) { ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ERR_R_MALLOC_FAILURE); - if (s != NULL) - OPENSSL_free(s); goto err; } s = sp; @@ -199,5 +197,7 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size) err_sl: ASN1err(ASN1_F_A2I_ASN1_ENUMERATED, ASN1_R_SHORT_LINE); } + if (ret != 1) + OPENSSL_free(s); return (ret); } -- cgit v1.2.3