Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/acpi: free _DSM package when no connectors

acpi_evaluate_dsm_typed() returns an ACPI package in pkg.
When pkg->package.count == 0, we returned without freeing pkg,
leaking memory. Free pkg before returning on the empty case.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Fixes: 337d7a1621c7 ("drm/i915: Fix invalid access to ACPI _DSM objects")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260109032549.1826303-1-kaushlendra.kumar@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

authored by

Kaushlendra Kumar and committed by
Jani Nikula
c0a27a0c 486200bd

+1
+1
drivers/gpu/drm/i915/display/intel_acpi.c
··· 96 96 97 97 if (!pkg->package.count) { 98 98 DRM_DEBUG_DRIVER("no connection in _DSM\n"); 99 + ACPI_FREE(pkg); 99 100 return; 100 101 } 101 102