Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Fix error paths



details:   https://anonhg.NetBSD.org/src/rev/fadc119d9fb5
branches:  trunk
changeset: 346177:fadc119d9fb5
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Jun 30 06:48:58 2016 +0000

description:
Fix error paths

Some error paths did m_put_rcvif_psref twice.

diffstat:

 sys/netinet/ip_input.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r df807306e37d -r fadc119d9fb5 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Thu Jun 30 05:56:46 2016 +0000
+++ b/sys/netinet/ip_input.c    Thu Jun 30 06:48:58 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.330 2016/06/28 02:02:56 ozaki-r Exp $   */
+/*     $NetBSD: ip_input.c,v 1.331 2016/06/30 06:48:58 ozaki-r Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.330 2016/06/28 02:02:56 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.331 2016/06/30 06:48:58 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -731,6 +731,7 @@
 
 ours:
        m_put_rcvif_psref(ifp, &psref);
+       ifp = NULL;
 
        /*
         * If offset or IP_MF are set, must reassemble.



Home | Main Index | Thread Index | Old Index