summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-09-19 20:42:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-30 21:58:00 +0200
commit0911224b6bf4c86c486746f1f993cddb006901e1 (patch)
tree82601b79ee4204a1c729523feb854aba7b075fff /drivers/staging/rtl8192u
parent0605bed9ba62e2e284be791da7ad6ee37d2f29cf (diff)
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>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r--drivers/staging/rtl8192u/r8192U_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index f0f755f8d8a1..d4510920b0e6 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -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;
}