summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sasyncd
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-12 20:04:23 +0000
committermmcc <mmcc@openbsd.org>2015-12-12 20:04:23 +0000
commit580f3da4fadda2c0bc745db06bfb0d3eb1c601e8 (patch)
tree1e6630bac4af723d91c7977f221f6a8f3c92be5b /usr.sbin/sasyncd
parentremove CA from pki and no longer allow specifying a CA with 'pki' keyword. (diff)
downloadwireguard-openbsd-580f3da4fadda2c0bc745db06bfb0d3eb1c601e8.tar.xz
wireguard-openbsd-580f3da4fadda2c0bc745db06bfb0d3eb1c601e8.zip
Remove NULL-checks before free().
Diffstat (limited to 'usr.sbin/sasyncd')
-rw-r--r--usr.sbin/sasyncd/net.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/sasyncd/net.c b/usr.sbin/sasyncd/net.c
index 507a7ba3d12..d4d2340b692 100644
--- a/usr.sbin/sasyncd/net.c
+++ b/usr.sbin/sasyncd/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.22 2015/08/20 22:39:29 deraadt Exp $ */
+/* $OpenBSD: net.c,v 1.23 2015/12/12 20:04:23 mmcc Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
@@ -641,10 +641,8 @@ net_shutdown(void)
free(qm);
}
net_disconnect_peer(p);
- if (p->sa)
- free(p->sa);
- if (p->name)
- free(p->name);
+ free(p->sa);
+ free(p->name);
LIST_REMOVE(p, link);
cfgstate.peercnt--;
free(p);