Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb fix memory leak



details:   https://anonhg.NetBSD.org/src/rev/ca74077f31f4
branches:  trunk
changeset: 785851:ca74077f31f4
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Apr 03 14:20:18 2013 +0000

description:
fix memory leak

diffstat:

 sys/dev/usb/if_athn_usb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r e8d7329d8590 -r ca74077f31f4 sys/dev/usb/if_athn_usb.c
--- a/sys/dev/usb/if_athn_usb.c Wed Apr 03 14:20:02 2013 +0000
+++ b/sys/dev/usb/if_athn_usb.c Wed Apr 03 14:20:18 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_athn_usb.c,v 1.4 2013/03/30 14:30:24 christos Exp $ */
+/*     $NetBSD: if_athn_usb.c,v 1.5 2013/04/03 14:20:18 christos Exp $ */
 /*     $OpenBSD: if_athn_usb.c,v 1.12 2013/01/14 09:50:31 jsing Exp $  */
 
 /*-
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.4 2013/03/30 14:30:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_athn_usb.c,v 1.5 2013/04/03 14:20:18 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2441,13 +2441,13 @@
                bpf_mtap3(ic->ic_rawbpf, m);
 
                if (athn_usb_tx(sc, m, ni, data) != 0) {
-                       m_free(m);
+                       m_freem(m);
                        ieee80211_free_node(ni);
                        ifp->if_oerrors++;
                        continue;
                }
                data = NULL;
-               m_free(m);
+               m_freem(m);
                ieee80211_free_node(ni);
                sc->sc_tx_timer = 5;
                ifp->if_timer = 1;



Home | Main Index | Thread Index | Old Index