]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Fix memory leak of object buf
authorColin Ian King <colin.king@canonical.com>
Tue, 23 Mar 2021 12:32:45 +0000 (12:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Mar 2021 19:33:06 +0000 (12:33 -0700)
commita35690c79eae07de9930b0dfb3c04e1c9bee25dc
treeeab162404d0ce05a873a66bf9dc4b5c8e0ec0069
parent8fba7987bc254a8968cf42f22e2d16a629a8f84a
octeontx2-af: Fix memory leak of object buf

Currently the error return path when lfs fails to allocate is not free'ing
the memory allocated to buf. Fix this by adding the missing kfree.

Addresses-Coverity: ("Resource leak")
Fixes: 56530bc3f5ab ("octeontx2-af: Formatting debugfs entry rsrc_alloc.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c