summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-08-19 07:24:48 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-08-19 07:24:48 +0000
commita7e20a539355f710104f8e4b3144446f8ad01222 (patch)
tree5528f4162935587b34c0665a06b8cd6750f2894f /sys
parentf1fde8aafd7e5288a289debfd122e61289938e6b (diff)
copyout only if oldp is non-null
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/nd6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index abaeed0c4d8..2eff198ee49 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.52 2002/08/19 06:45:00 itojun Exp $ */
+/* $OpenBSD: nd6.c,v 1.53 2002/08/19 07:24:47 itojun Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -1985,13 +1985,13 @@ nd6_sysctl(name, oldp, oldlenp, newp, newlen)
switch (name) {
case ICMPV6CTL_ND6_DRLIST:
error = fill_drlist(oldp, oldlenp, ol);
- if (!error)
+ if (!error && oldp)
copyout(oldp, oldp, *oldlenp);
break;
case ICMPV6CTL_ND6_PRLIST:
error = fill_prlist(oldp, oldlenp, ol);
- if (!error)
+ if (!error && oldp)
copyout(oldp, oldp, *oldlenp);
break;