summaryrefslogtreecommitdiffstats
path: root/sbin/iked/policy.c
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2019-12-28 16:27:04 +0000
committertobhe <tobhe@openbsd.org>2019-12-28 16:27:04 +0000
commit8fdeade23c5858406f2bc5e8be973aa2a970bd92 (patch)
tree3d172a05680fc922f1af3450ffb1c7e9c1ab07ed /sbin/iked/policy.c
parentDisable interop test with rsyslogd and TLS. Starting rsyslogd with (diff)
downloadwireguard-openbsd-8fdeade23c5858406f2bc5e8be973aa2a970bd92.tar.xz
wireguard-openbsd-8fdeade23c5858406f2bc5e8be973aa2a970bd92.zip
Refactor child SA cleanup.
ok bluhm@
Diffstat (limited to 'sbin/iked/policy.c')
-rw-r--r--sbin/iked/policy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/iked/policy.c b/sbin/iked/policy.c
index 2916f0590d5..fcb82cf08f0 100644
--- a/sbin/iked/policy.c
+++ b/sbin/iked/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.52 2019/12/10 12:20:17 tobhe Exp $ */
+/* $OpenBSD: policy.c,v 1.53 2019/12/28 16:27:04 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -563,6 +563,9 @@ childsa_free(struct iked_childsa *csa)
{
struct iked_childsa *csb;
+ if (csa == NULL)
+ return;
+
if (csa->csa_children) {
/* XXX should not happen */
log_warnx("%s: trying to remove CSA %p children %u",