Commit 27c346a2 authored by Suman Ghosh's avatar Suman Ghosh Committed by David S. Miller

octeontx2-af: Fix a double free issue

There was a memory leak during error handling in function
npc_mcam_rsrcs_init().

Fixes: dd784287 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs")
Suggested-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarSuman Ghosh <sumang@marvell.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent afa9e267
......@@ -1990,7 +1990,7 @@ int npc_mcam_rsrcs_init(struct rvu *rvu, int blkaddr)
free_bmap_reverse:
kfree(mcam->bmap_reverse);
free_bmap:
kfree(mcam->counters.bmap);
kfree(mcam->bmap);
return -ENOMEM;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment