Module Name: src Committed By: christos Date: Wed Apr 3 14:20:18 UTC 2013
Modified Files: src/sys/dev/usb: if_athn_usb.c Log Message: fix memory leak To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_athn_usb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/if_athn_usb.c diff -u src/sys/dev/usb/if_athn_usb.c:1.4 src/sys/dev/usb/if_athn_usb.c:1.5 --- src/sys/dev/usb/if_athn_usb.c:1.4 Sat Mar 30 10:30:24 2013 +++ src/sys/dev/usb/if_athn_usb.c Wed Apr 3 10:20:18 2013 @@ -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 @@ athn_usb_start(struct ifnet *ifp) 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;