summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/stack/stack.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/stack/stack.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/stack/stack.c')
-rw-r--r--lib/libcrypto/stack/stack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcrypto/stack/stack.c b/lib/libcrypto/stack/stack.c
index 7eb00fd6e40..80ad087753f 100644
--- a/lib/libcrypto/stack/stack.c
+++ b/lib/libcrypto/stack/stack.c
@@ -297,8 +297,7 @@ sk_free(_STACK *st)
{
if (st == NULL)
return;
- if (st->data != NULL)
- free(st->data);
+ free(st->data);
free(st);
}