]> 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)
commit47451875b52a308a38c9ea329f2d6a3ea9349be7
treeeab162404d0ce05a873a66bf9dc4b5c8e0ec0069
parent9f2b87c997683ca2283fcd69d1352d0880555104
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: 6441241e30d4 ("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