projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8958f58
)
Staging: wilc1000: Freed memory in case of error
author
Claudiu Beznea
<
[email protected]
>
Sun, 24 Apr 2016 23:07:18 +0000
(
02:07
+0300)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 29 Apr 2016 05:06:51 +0000
(22:06 -0700)
This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt()
in case wilc_wlan_txq_add_to_head() fails.
Signed-off-by: Claudiu Beznea <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/wilc1000/wilc_wlan.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wilc1000/wilc_wlan.c
b/drivers/staging/wilc1000/wilc_wlan.c
index 7da3b4ac1dc5c61640ac7c0e77853314ff9fb6aa..11e16d56ace701248bbd709d4ff0e2b87446b3d2 100644
(file)
--- a/
drivers/staging/wilc1000/wilc_wlan.c
+++ b/
drivers/staging/wilc1000/wilc_wlan.c
@@
-325,8
+325,11
@@
static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
tqe->priv = NULL;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
- if (wilc_wlan_txq_add_to_head(vif, tqe))
+ if (wilc_wlan_txq_add_to_head(vif, tqe)) {
+ kfree(tqe);
return 0;
+ }
+
return 1;
}