]> git.ipfire.org Git - thirdparty/kernel/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)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 2 Mar 2026 22:29:29 +0000 (14:29 -0800)
commit6bc6fec71ac45f52db609af4e62bdb96b9f5fadb
tree2314f6676526a096eef3a8a248dcd17ffa74461d
parentd139209ef88e48af1f6731cd45440421c757b6b5
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>
drivers/gpu/drm/xe/xe_reg_sr.c