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:
436acce
)
cxgb4: fix memory leak on txq_info
author
Colin Ian King
<
[email protected]
>
Wed, 23 Nov 2016 11:02:44 +0000
(11:02 +0000)
committer
David S. Miller
<
[email protected]
>
Fri, 25 Nov 2016 21:09:50 +0000
(16:09 -0500)
Currently if txq_info->uldtxq cannot be allocated then
txq_info->txq is being kfree'd (which is redundant because it
is NULL) instead of txq_info. Fix this by instead kfree'ing
txq_info.
Signed-off-by: Colin Ian King <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 565a6c6bfeaf379505869d2ea8eae40bdd32f1a9..8098902c094a1d6e9e340dfbd54102079823e488 100644
(file)
--- a/
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@
-532,7
+532,7
@@
setup_sge_txq_uld(struct adapter *adap, unsigned int uld_type,
txq_info->uldtxq = kcalloc(txq_info->ntxq, sizeof(struct sge_uld_txq),
GFP_KERNEL);
if (!txq_info->uldtxq) {
- kfree(txq_info
->uldtxq
);
+ kfree(txq_info);
return -ENOMEM;
}