mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
wifi: zd1211rw: fix potential memory leak in __zd_usb_enable_rx()
The memory allocated for urbs with kcalloc() is not freed on any error
path. Fix that by freeing it in the error path.
Fixes: e85d0918b5 ("[PATCH] ZyDAS ZD1211 USB-WLAN driver")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20251028174341.139134-1-nihaal@cse.iitm.ac.in
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
fbc1cc6973
commit
70e8335485
|
|
@ -791,6 +791,7 @@ static int __zd_usb_enable_rx(struct zd_usb *usb)
|
|||
if (urbs) {
|
||||
for (i = 0; i < RX_URBS_COUNT; i++)
|
||||
free_rx_urb(urbs[i]);
|
||||
kfree(urbs);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user