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: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190920014303.31410-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0605bed9ba
commit
0911224b6b
|
@ -1211,6 +1211,8 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
DMESGE("Error TX CMD URB, error %d", status);
|
DMESGE("Error TX CMD URB, error %d", status);
|
||||||
|
dev_kfree_skb(skb);
|
||||||
|
usb_free_urb(tx_urb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue