]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:39 +0000 (15:42 -0500)
commitb69fc6f433525e40726dda55290719ea0e803c29
treeb0cb82ff75b7d40e144c9b0d48a0004dbfcbc01a
parentd9053ef3721b0eda37ef92118cd29a5df619fe86
octeontx2-af: Fix memory leak of object buf

BugLink: https://bugs.launchpad.net/bugs/1922601
[ Upstream commit 9e0a537d06fc36861e4f78d0a7df1fe2b3592714 ]

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: f7884097141b ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c