S2io: Fix memory leak during free_tx_buffers
authorSreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Wed, 23 Apr 2008 17:28:08 +0000 (13:28 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Apr 2008 06:07:09 +0000 (02:07 -0400)
- Fix the memory leak during free_tx_buffers.

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/s2io.c

index dcbe01b0ca0de05d3c21d75f5661858d88157232..ab96aa292b78e39f959dbfbd09a45139af15a3c8 100644 (file)
@@ -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);