diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bytes.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bytes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_bytes.c b/src/lib/libcrypto/asn1/a_bytes.c index 30647c97b5..34ed7b7db2 100644 --- a/src/lib/libcrypto/asn1/a_bytes.c +++ b/src/lib/libcrypto/asn1/a_bytes.c | |||
@@ -99,7 +99,7 @@ d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp, | |||
99 | ret = (*a); | 99 | ret = (*a); |
100 | 100 | ||
101 | if (len != 0) { | 101 | if (len != 0) { |
102 | s = (unsigned char *)malloc((int)len + 1); | 102 | s = malloc((int)len + 1); |
103 | if (s == NULL) { | 103 | if (s == NULL) { |
104 | i = ERR_R_MALLOC_FAILURE; | 104 | i = ERR_R_MALLOC_FAILURE; |
105 | goto err; | 105 | goto err; |
@@ -205,7 +205,7 @@ d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp, | |||
205 | if ((ret->length < len) || (ret->data == NULL)) { | 205 | if ((ret->length < len) || (ret->data == NULL)) { |
206 | if (ret->data != NULL) | 206 | if (ret->data != NULL) |
207 | free(ret->data); | 207 | free(ret->data); |
208 | s = (unsigned char *)malloc((int)len + 1); | 208 | s = malloc(len + 1); |
209 | if (s == NULL) { | 209 | if (s == NULL) { |
210 | i = ERR_R_MALLOC_FAILURE; | 210 | i = ERR_R_MALLOC_FAILURE; |
211 | goto err; | 211 | goto err; |