amd-xgbe: fix potential memory leak in xgbe-debugfs
authorGeliang Tang <geliangtang@163.com>
Wed, 30 Sep 2015 10:48:50 +0000 (03:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 10:05:41 +0000 (03:05 -0700)
commit9dc80a74313d2741e053a650942818a86f234fc9
tree01ac890a14d3bf1c948647718201d961980cbc8c
parente6740165b8f7f06d8caee0fceab3fb9d790a6fed
amd-xgbe: fix potential memory leak in xgbe-debugfs

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