From ab623c923d4e2c950342aec5da371cb92b1fbbc6 Mon Sep 17 00:00:00 2001 From: mrezai Date: Tue, 3 May 2016 23:59:14 +0430 Subject: Update OpenSSL to 1.0.2h --- drivers/builtin_openssl2/crypto/asn1/a_bytes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/builtin_openssl2/crypto/asn1/a_bytes.c') diff --git a/drivers/builtin_openssl2/crypto/asn1/a_bytes.c b/drivers/builtin_openssl2/crypto/asn1/a_bytes.c index 12715a7280..385b53986a 100644 --- a/drivers/builtin_openssl2/crypto/asn1/a_bytes.c +++ b/drivers/builtin_openssl2/crypto/asn1/a_bytes.c @@ -200,13 +200,13 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, } else { if (len != 0) { if ((ret->length < len) || (ret->data == NULL)) { - if (ret->data != NULL) - OPENSSL_free(ret->data); s = (unsigned char *)OPENSSL_malloc((int)len + 1); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; } + if (ret->data != NULL) + OPENSSL_free(ret->data); } else s = ret->data; memcpy(s, p, (int)len); -- cgit v1.2.3