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

intel_color_pipeline_plane_init() allocates enum names for color
pipelines, which are copied by drm_property_create_enum(). The temporary
strings were not freed, resulting in a memory leak.

Allocate enum names only after successful pipeline construction and free
them on all exit paths.

Fixes: ef105316819d ("drm/i915/color: Create a transfer function color pipeline")
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260113102303.724205-5-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/i915/display/intel_color_pipeline.c