Commit 0911224b authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Greg Kroah-Hartman

staging: rtl8192u: release memory on error path

In rtl819xU_tx_cmd if usb_submit_urb fails the allocated memories should
be released.
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190920014303.31410-1-navid.emamdoost@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0605bed9
......@@ -1211,6 +1211,8 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
return 0;
DMESGE("Error TX CMD URB, error %d", status);
dev_kfree_skb(skb);
usb_free_urb(tx_urb);
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment