From: Sreenivasa Honnur Date: Wed, 23 Apr 2008 17:28:08 +0000 (-0400) Subject: S2io: Fix memory leak during free_tx_buffers X-Git-Tag: v2.6.26-rc1~1067^2~1^2~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b35b3b49fc6750806964048b31799c8782980ef9;p=linux-2.6 S2io: Fix memory leak during free_tx_buffers - Fix the memory leak during free_tx_buffers. Signed-off-by: Santosh Rastapur Signed-off-by: Ramkrishna Vepa Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index dcbe01b0ca..ab96aa292b 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -2458,7 +2458,7 @@ static void free_tx_buffers(struct s2io_nic *nic) for (i = 0; i < config->tx_fifo_num; i++) { unsigned long flags; spin_lock_irqsave(&mac_control->fifos[i].tx_lock, flags); - for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { + for (j = 0; j < config->tx_cfg[i].fifo_len; j++) { txdp = (struct TxD *) \ mac_control->fifos[i].list_info[j].list_virt_addr; skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);