projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e674016
)
amd-xgbe: fix potential memory leak in xgbe-debugfs
author
Geliang Tang
<geliangtang@163.com>
Wed, 30 Sep 2015 10:48:50 +0000
(
03:48
-0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 5 Oct 2015 10:05:41 +0000
(
03:05
-0700)
Added kfree() to avoid the memory leak when debugfs_create_dir() fails.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
index
2c063b6
..
66137ff
100644
(file)
--- a/
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
+++ b/
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
@@
-330,6
+330,7
@@
void xgbe_debugfs_init(struct xgbe_prv_data *pdata)
pdata->xgbe_debugfs = debugfs_create_dir(buf, NULL);
if (!pdata->xgbe_debugfs) {
netdev_err(pdata->netdev, "debugfs_create_dir failed\n");
+ kfree(buf);
return;
}