diff options
author | 2014-05-30 06:22:57 +0000 | |
---|---|---|
committer | 2014-05-30 06:22:57 +0000 | |
commit | 0b1e30339eeb8f43097c86a51e3f4e526dce5d73 (patch) | |
tree | 4adc99aff640e367a82c027f2de70634404f66a1 /lib/libcrypto/asn1/a_bitstr.c | |
parent | While working on another diff I ended up looking to see why on earth the (diff) | |
download | wireguard-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.c | 3 |
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) |