]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe/reg_sr: Fix leak on xa_store failure
authorShuicheng Lin <shuicheng.lin@intel.com>
Wed, 4 Feb 2026 17:28:11 +0000 (17:28 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 4 Mar 2026 13:54:19 +0000 (08:54 -0500)
commit3091723785def05ebfe6a50866f87a044ae314ba
tree2abfaf5c44fd37e87570f1729baf8ba00e59fd34
parent89865e6dc8487b627302bdced3f965cd0c406835
drm/xe/reg_sr: Fix leak on xa_store failure

Free the newly allocated entry when xa_store() fails to avoid a memory
leak on the error path.

v2: use goto fail_free. (Bala)

Fixes: e5283bd4dfec ("drm/xe/reg_sr: Remove register pool")
Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260204172810.1486719-2-shuicheng.lin@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit 6bc6fec71ac45f52db609af4e62bdb96b9f5fadb)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_reg_sr.c