]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Fix color pipeline enum name leak
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Tue, 13 Jan 2026 10:22:52 +0000 (15:52 +0530)
committerMaarten Lankhorst <dev@lankhorst.se>
Thu, 22 Jan 2026 09:24:55 +0000 (10:24 +0100)
commit7d8257fe2590fea9fef8071507f3b8a052c5e3d1
treef6f5a74c63471ae734a7113394a841aa84605060
parent7261305d22a729fb7f8a3187414c145a492787d4
drm/amd/display: Fix color pipeline enum name leak

dm_plane_init_colorops() allocates enum names for color pipelines.
These are eventually passed to drm_property_create_enum() which create
its own copies of the string. Free the strings after initialization
is done.

Also, allocate color pipeline enum names only after successfully creating
color pipeline.

Fixes: 9ba25915efba ("drm/amd/display: Add support for sRGB EOTF in DEGAM block")
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Acked-by: Alex Deucher <alexander.deucher@amd.com> #irc
Link: https://patch.msgid.link/20260113102303.724205-3-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c