summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/asn1/a_bytes.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2016-07-21 12:28:11 +0800
committerPeter Jones <pjones@redhat.com>2016-09-06 15:05:36 -0400
commit8dcfecc6c76effa8afe0d4b6eca95023d51f1e03 (patch)
tree42c00f22bb1e6c668703bd83939f30dda01ad7e6 /Cryptlib/OpenSSL/crypto/asn1/a_bytes.c
parentd8b0e8e0ce347d9f5830cfeb3fd09a887a903d09 (diff)
downloadefi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.tar.gz
efi-boot-shim-8dcfecc6c76effa8afe0d4b6eca95023d51f1e03.zip
Update to openssl 1.0.2h
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/a_bytes.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/a_bytes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/asn1/a_bytes.c b/Cryptlib/OpenSSL/crypto/asn1/a_bytes.c
index 12715a72..385b5398 100644
--- a/Cryptlib/OpenSSL/crypto/asn1/a_bytes.c
+++ b/Cryptlib/OpenSSL/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);