mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
wireless: purelifi: plfxlc: fix memory leak in plfxlc_usb_wreq_asyn()
Add usb_free_urb() in the error path to prevent memory leak. Signed-off-by: Salah Triki <salah.triki@gmail.com> Link: https://patch.msgid.link/aA3_maPlEJzO7wrL@pc [fix subject] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
22c64f37e1
commit
63a9a727d3
|
|
@ -503,8 +503,10 @@ int plfxlc_usb_wreq_async(struct plfxlc_usb *usb, const u8 *buffer,
|
|||
(void *)buffer, buffer_len, complete_fn, context);
|
||||
|
||||
r = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
if (r)
|
||||
if (r) {
|
||||
usb_free_urb(urb);
|
||||
dev_err(&udev->dev, "Async write submit failed (%d)\n", r);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user