summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-09-11 15:21:31 +0000
committermpi <mpi@openbsd.org>2015-09-11 15:21:31 +0000
commit184d60c47849a4f08a2d1f5ad001b0ee63655cc6 (patch)
treeafd66d38ccb6d059ae9f5c6132446ec46587139e
parenttypo (diff)
downloadwireguard-openbsd-184d60c47849a4f08a2d1f5ad001b0ee63655cc6.tar.xz
wireguard-openbsd-184d60c47849a4f08a2d1f5ad001b0ee63655cc6.zip
rtfree(9) accepts NULL now.
-rw-r--r--sys/net/pf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 833323b90e5..9f3117e651a 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.940 2015/09/11 08:17:06 claudio Exp $ */
+/* $OpenBSD: pf.c,v 1.941 2015/09/11 15:21:31 mpi Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5418,8 +5418,7 @@ pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kif *kif,
} else
ret = 0;
out:
- if (rt0 != NULL)
- rtfree(rt0);
+ rtfree(rt0);
return (ret);
}
@@ -5615,8 +5614,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
done:
if (r->rt != PF_DUPTO)
*m = NULL;
- if (rt != NULL)
- rtfree(rt);
+ rtfree(rt);
return;
bad: