summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet6/ipsec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c
index 46ecaa4..917fa33 100644
--- a/sys/netinet6/ipsec.c
+++ b/sys/netinet6/ipsec.c
@@ -1311,8 +1311,11 @@ ipsec_deepcopy_policy(src)
struct ipsecrequest *r;
struct secpolicy *dst;
+ if (src == NULL)
+ return NULL;
+
dst = key_newsp(0);
- if (src == NULL || dst == NULL)
+ if (dst == NULL)
return NULL;
/*
OpenPOWER on IntegriCloud