summaryrefslogtreecommitdiff
path: root/lib/libcrypto/asn1/a_enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/asn1/a_enum.c')
-rw-r--r--lib/libcrypto/asn1/a_enum.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/a_enum.c b/lib/libcrypto/asn1/a_enum.c
index aa28c7c8d78..b5142887821 100644
--- a/lib/libcrypto/asn1/a_enum.c
+++ b/lib/libcrypto/asn1/a_enum.c
@@ -76,8 +76,7 @@ ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v)
a->type = V_ASN1_ENUMERATED;
if (a->length < (int)(sizeof(long) + 1)) {
- if (a->data != NULL)
- free(a->data);
+ free(a->data);
a->data = calloc(1, sizeof(long) + 1);
}
if (a->data == NULL) {