summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/asn1/a_bitstr.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-05-30 06:22:57 +0000
committerderaadt <deraadt@openbsd.org>2014-05-30 06:22:57 +0000
commit0b1e30339eeb8f43097c86a51e3f4e526dce5d73 (patch)
tree4adc99aff640e367a82c027f2de70634404f66a1 /lib/libcrypto/asn1/a_bitstr.c
parentWhile working on another diff I ended up looking to see why on earth the (diff)
downloadwireguard-openbsd-0b1e30339eeb8f43097c86a51e3f4e526dce5d73.tar.xz
wireguard-openbsd-0b1e30339eeb8f43097c86a51e3f4e526dce5d73.zip
more: no need for null check before free
ok tedu guenther
Diffstat (limited to 'lib/libcrypto/asn1/a_bitstr.c')
-rw-r--r--lib/libcrypto/asn1/a_bitstr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/a_bitstr.c b/lib/libcrypto/asn1/a_bitstr.c
index f3cce8b5366..058a3ccc5fa 100644
--- a/lib/libcrypto/asn1/a_bitstr.c
+++ b/lib/libcrypto/asn1/a_bitstr.c
@@ -165,8 +165,7 @@ c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, const unsigned char **pp, long len)
s = NULL;
ret->length = (int)len;
- if (ret->data != NULL)
- free(ret->data);
+ free(ret->data);
ret->data = s;
ret->type = V_ASN1_BIT_STRING;
if (a != NULL)