Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Add missing if_free() in the detach path.



details:   https://anonhg.NetBSD.org/src/rev/419e0a8aa485
branches:  trunk
changeset: 828553:419e0a8aa485
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Dec 19 06:40:22 2017 +0000

description:
Add missing if_free() in the detach path.

diffstat:

 sys/dev/usb/uhso.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9163299b9ef7 -r 419e0a8aa485 sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c        Tue Dec 19 03:32:35 2017 +0000
+++ b/sys/dev/usb/uhso.c        Tue Dec 19 06:40:22 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhso.c,v 1.25 2017/01/11 22:09:38 maya Exp $   */
+/*     $NetBSD: uhso.c,v 1.26 2017/12/19 06:40:22 msaitoh Exp $        */
 
 /*-
  * Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.25 2017/01/11 22:09:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.26 2017/12/19 06:40:22 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1993,6 +1993,7 @@
        s = splnet();
        bpf_detach(ifp);
        if_detach(ifp);
+       if_free(ifp);
        splx(s);
 
        kmem_free(hp, sizeof(struct uhso_port));



Home | Main Index | Thread Index | Old Index