summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-10-10 19:26:40 +0000
committerdg <dg@FreeBSD.org>1998-10-10 19:26:40 +0000
commit04193443e723f220d7454e40175cb29674e0dbd1 (patch)
tree9cdb1278451d4d35a0e9370845a58bbc3bfa09d6 /sys/dev/fxp
parentb350ac99acb7520768e8a3385777f315c14b6733 (diff)
downloadFreeBSD-src-04193443e723f220d7454e40175cb29674e0dbd1.zip
FreeBSD-src-04193443e723f220d7454e40175cb29674e0dbd1.tar.gz
Fixed mbuf leak in fxp_stop().
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index faf83fb..50527d4 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.54 1998/08/02 00:33:38 dg Exp $
+ * $Id: if_fxp.c,v 1.55 1998/08/04 08:53:12 dg Exp $
*/
/*
@@ -1169,10 +1169,14 @@ fxp_stop(sc)
/*
* Release any xmit buffers.
*/
- for (txp = sc->cbl_first; txp != NULL && txp->mb_head != NULL;
- txp = txp->next) {
- m_freem(txp->mb_head);
- txp->mb_head = NULL;
+ txp = sc->cbl_base;
+ if (txp != NULL) {
+ for (i = 0; i < FXP_NTXCB; i++) {
+ if (txp[i].mb_head != NULL) {
+ m_freem(txp[i].mb_head);
+ txp[i].mb_head = NULL;
+ }
+ }
}
sc->tx_queued = 0;
OpenPOWER on IntegriCloud