Search Linux Wireless

[patch -next 2/2] ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Carpenter wrote:
> 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@xxxxxxxxx>

Thanks.

Acked-by: Sujith <Sujith.Manoharan@xxxxxxxxxxx>

> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 46dc41a..77b3591 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -607,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;
>  }
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux