Commit f6f20406 authored by Colin Ian King's avatar Colin Ian King Committed by Zheng Zengkai
Browse files

octeontx2-af: Fix memory leak of object buf



stable inclusion
from stable-5.10.27
commit 889c56ea941ed327e037db04b7630f1c85d777df
bugzilla: 51493

--------------------------------

[ Upstream commit 9e0a537d ]

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: f7884097 ("octeontx2-af: Formatting debugfs entry rsrc_alloc.")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarSunil Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b33aea55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment