summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvd/dump.c
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-11 20:15:52 +0000
committermmcc <mmcc@openbsd.org>2015-12-11 20:15:52 +0000
commit85fc22730c12ceb0f5585eb2f74fe7ba8ad4777c (patch)
treecd0e48dc741b393593869adf0e67892925b65f2f /usr.sbin/rtadvd/dump.c
parentremove no longer needed prototype (diff)
downloadwireguard-openbsd-85fc22730c12ceb0f5585eb2f74fe7ba8ad4777c.tar.xz
wireguard-openbsd-85fc22730c12ceb0f5585eb2f74fe7ba8ad4777c.zip
Remove NULL-checks before free().
Diffstat (limited to 'usr.sbin/rtadvd/dump.c')
-rw-r--r--usr.sbin/rtadvd/dump.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c
index 16d860e3b7f..34b26403782 100644
--- a/usr.sbin/rtadvd/dump.c
+++ b/usr.sbin/rtadvd/dump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.c,v 1.16 2015/10/25 22:11:34 jca Exp $ */
+/* $OpenBSD: dump.c,v 1.17 2015/12/11 20:15:52 mmcc Exp $ */
/* $KAME: dump.c,v 1.27 2002/05/29 14:23:55 itojun Exp $ */
/*
@@ -204,14 +204,10 @@ rtadvd_dump(void)
vltime, (vltimexpire)? vltimexpire : "",
pltime, (pltimexpire)? pltimexpire : "", flags);
- if (vltimexpire) {
- free(vltimexpire);
- vltimexpire = NULL;
- }
- if (pltimexpire) {
- free(pltimexpire);
- pltimexpire = NULL;
- }
+ free(vltimexpire);
+ vltimexpire = NULL;
+ free(pltimexpire);
+ pltimexpire = NULL;
free(vltime);
free(pltime);
free(flags);