Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 copyout only if oldp is non-null



details:   https://anonhg.NetBSD.org/src/rev/d3f9e566372a
branches:  trunk
changeset: 535444:d3f9e566372a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Aug 19 07:23:22 2002 +0000

description:
copyout only if oldp is non-null

diffstat:

 sys/netinet6/nd6.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 3f7278d97385 -r d3f9e566372a sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Mon Aug 19 06:50:22 2002 +0000
+++ b/sys/netinet6/nd6.c        Mon Aug 19 07:23:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.67 2002/08/19 06:50:22 itojun Exp $  */
+/*     $NetBSD: nd6.c,v 1.68 2002/08/19 07:23:22 itojun Exp $  */
 /*     $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $   */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.67 2002/08/19 06:50:22 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.68 2002/08/19 07:23:22 itojun Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1968,13 +1968,13 @@
        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;
 



Home | Main Index | Thread Index | Old Index