summaryrefslogtreecommitdiff
path: root/usr.sbin/sasyncd
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-12 20:04:24 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-12 20:04:24 +0000
commit4735ccca4462d5820ad08d28cb8cfd5151eb9d9f (patch)
treece0b744455b18d2ed0d71f6328fc63a57aff22f0 /usr.sbin/sasyncd
parent921ca576c5940a00b46b54ae0bc24d8d1fae52d7 (diff)
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);