Search Linux Wireless

Re: [PATCH] wifi: mt76: fix potential memory leak in mt76_wmac_probe()

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

 



On 09. 07. 25, 16:55, Abdun Nihaal wrote:
In mt76_wmac_probe(), when the mt76_alloc_device() call succeeds, memory
is allocated for both struct ieee80211_hw and a workqueue. However, on
the error path, the workqueue is not freed. Fix that by calling
mt76_free_device() on the error path.

Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
Signed-off-by: Abdun Nihaal <abdun.nihaal@xxxxxxxxx>

I am not sure, why I am CCed, but makes sense anyway (free the one obtained by alloc_ordered_workqueue() in mt76_alloc_device()):

Reviewed-by: Jiri Slaby <jirislaby@xxxxxxxxxx>

--
js
suse labs




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux