Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: free _DSM package when no connectors
@ 2026-01-09  3:25 Kaushlendra Kumar
  2026-01-09  3:35 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Kaushlendra Kumar @ 2026-01-09  3:25 UTC (permalink / raw)
  To: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, airlied,
	simona
  Cc: intel-gfx, intel-xe, dri-devel, Kaushlendra Kumar

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>
---
 drivers/gpu/drm/i915/display/intel_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/display/intel_acpi.c b/drivers/gpu/drm/i915/display/intel_acpi.c
index 68c01932f7b4..e06f324027be 100644
--- a/drivers/gpu/drm/i915/display/intel_acpi.c
+++ b/drivers/gpu/drm/i915/display/intel_acpi.c
@@ -96,6 +96,7 @@ static void intel_dsm_platform_mux_info(acpi_handle dhandle)
 
 	if (!pkg->package.count) {
 		DRM_DEBUG_DRIVER("no connection in _DSM\n");
+		ACPI_FREE(pkg);
 		return;
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-11 12:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09  3:25 [PATCH] drm/i915: free _DSM package when no connectors Kaushlendra Kumar
2026-01-09  3:35 ` ✓ CI.KUnit: success for " Patchwork
2026-01-09  4:08 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-09  6:37 ` ✓ Xe.CI.Full: " Patchwork
2026-01-09  8:57 ` [PATCH] " Jani Nikula
2026-02-11 12:03   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox