Skip to content

Commit

Permalink
ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
Browse files Browse the repository at this point in the history
This is obviously a small picky thing.  The original error handling code
doesn't free the most recent allocations which haven't been added to the
hif_dev->tx.tx_buf list yet.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Dan Carpenter authored and John W. Linville committed May 24, 2010
1 parent 690e781 commit 7606688
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)

return 0;
err:
if (tx_buf) {
kfree(tx_buf->buf);
kfree(tx_buf);
}
ath9k_hif_usb_dealloc_tx_urbs(hif_dev);
return -ENOMEM;
}
Expand Down

0 comments on commit 7606688

Please sign in to comment.