Skip to content

Commit 70e8335

Browse files
Abdun Nihaaljmberg-intel
authored andcommitted
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: e85d091 ("[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>
1 parent fbc1cc6 commit 70e8335

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/wireless/zydas/zd1211rw

1 file changed

+1
-0
lines changed

drivers/net/wireless/zydas/zd1211rw/zd_usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,7 @@ static int __zd_usb_enable_rx(struct zd_usb *usb)
791791
if (urbs) {
792792
for (i = 0; i < RX_URBS_COUNT; i++)
793793
free_rx_urb(urbs[i]);
794+
kfree(urbs);
794795
}
795796
return r;
796797
}

0 commit comments

Comments
 (0)