aboutsummaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/pyynl/ynl_gen_c.py
diff options
context:
space:
mode:
authorAbdun Nihaal <[email protected]>2025-04-14 17:06:46 +0000
committerJakub Kicinski <[email protected]>2025-04-17 00:52:18 +0000
commit00ffb3724ce743578163f5ade2884374554ca021 (patch)
tree78836271d97a4bfe8288dea15a3dcd2cae2fd764 /tools/net/ynl/pyynl/ynl_gen_c.py
parentMerge tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org/pub/scm... (diff)
downloadkernel-00ffb3724ce743578163f5ade2884374554ca021.tar.gz
kernel-00ffb3724ce743578163f5ade2884374554ca021.zip
cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path. Fixes: d915c299f1da ("cxgb4: add skeleton for ethtool n-tuple filters") Signed-off-by: Abdun Nihaal <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/net/ynl/pyynl/ynl_gen_c.py')
0 files changed, 0 insertions, 0 deletions