All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: free intel_fb
@ 2016-08-23 15:00 Matthew Auld
  2016-08-23 15:16 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthew Auld @ 2016-08-23 15:00 UTC (permalink / raw)
  To: intel-gfx

We need to free the allocated intel_fb in the error path, not
intel_fb->base. Otherwise we risk calling kfree with a non-kmalloc'd
address, which is bound to give us grief at some point.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a5c80cb5..79bc99d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9798,7 +9798,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
 	return;
 
 error:
-	kfree(fb);
+	kfree(intel_fb);
 }
 
 static void ironlake_get_pfit_config(struct intel_crtc *crtc,
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-08-24 13:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 15:00 [PATCH] drm/i915: free intel_fb Matthew Auld
2016-08-23 15:16 ` Chris Wilson
2016-08-23 19:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-08-24 10:06   ` Matthew Auld
2016-08-24 13:08     ` Joonas Lahtinen
2016-08-24 13:11       ` Chris Wilson
2016-08-24 11:08 ` ✓ Fi.CI.BAT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.