summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipsp.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-10-13 06:49:47 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-10-13 06:49:47 +0000
commitca513ebf096209e48e356bf479321126035e202a (patch)
treef8f721a31d1f11ef3e8c5c1362e2c6ee4270911c /sys/netinet/ip_ipsp.c
parent9d88abd3a3c3a2911de0e7d1dcd936022e8e7a4b (diff)
Remove NULL deref condition
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r--sys/netinet/ip_ipsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 3d1e940947a..31700ec9c8c 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.26 1998/05/18 21:10:57 provos Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.27 1998/10/13 06:49:46 niklas Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -378,7 +378,7 @@ cleanup_expirations(struct in_addr dst, u_int32_t spi, u_int8_t sproto)
{
struct expiration *exp, *nexp;
- for (exp = explist; exp; exp = exp->exp_next)
+ for (exp = explist; exp; exp = exp ? exp->exp_next : explist)
if ((exp->exp_dst.s_addr == dst.s_addr) &&
(exp->exp_spi == spi) && (exp->exp_sproto == sproto))
{