diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-05-30 06:22:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-05-30 06:22:58 +0000 |
commit | 92fe7f51d198ea62cc552bf356ca8d58fa48417f (patch) | |
tree | b9cbba44945fc3ef0c4bbbd4778edfff3328f155 /lib/libcrypto/asn1/a_enum.c | |
parent | 5e5527b3e65377286505a3ba5f9a7f0fa64f00f1 (diff) |
more: no need for null check before free
ok tedu guenther
Diffstat (limited to 'lib/libcrypto/asn1/a_enum.c')
-rw-r--r-- | lib/libcrypto/asn1/a_enum.c | 3 |
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) { |