diff options
| author | Kaushlendra Kumar <kaushlendra.kumar@intel.com> | 2026-01-05 08:48:20 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-11 13:40:23 +0100 |
| commit | 811b45e2d795d955bb7fd9c816b40036f4fde350 (patch) | |
| tree | a23e6e791174a326069be6595010111ebe96a4e3 /include/net/aligned_data.h | |
| parent | 70b24ad9d84a98c712c730336c9c4a9decbc985e (diff) | |
regmap: maple: free entry on mas_store_gfp() failure
[ Upstream commit f3f380ce6b3d5c9805c7e0b3d5bc28d9ec41e2e8 ]
regcache_maple_write() allocates a new block ('entry') to merge
adjacent ranges and then stores it with mas_store_gfp().
When mas_store_gfp() fails, the new 'entry' remains allocated and
is never freed, leaking memory.
Free 'entry' on the failure path; on success continue freeing the
replaced neighbor blocks ('lower', 'upper').
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Link: https://patch.msgid.link/20260105031820.260119-1-kaushlendra.kumar@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
