From 7056852f259d7f27d9357c4925f0abac7421c280 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Wed, 15 Feb 2012 15:02:45 +0200 Subject: [PATCH] gfx: drv: Free the correct pointer in psb_framebuffer_destroy() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Pass the pointer to the psb_framebuffer structure to kfree(), not the pointer to the embedded drm_framebuffer structure. Luckily in this case the drm_framebuffer is embedded as the first member inside psb_framebuffer, so the incorrect code didn't manage to make a mess of things. Signed-off-by: Ville Syrjälä Reviewed-by: Imre Deak Signed-off-by: Kirill A. Shutemov --- drivers/staging/mrst/drv/psb_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mrst/drv/psb_fb.c b/drivers/staging/mrst/drv/psb_fb.c index df63a62..38e04b0 100644 --- a/drivers/staging/mrst/drv/psb_fb.c +++ b/drivers/staging/mrst/drv/psb_fb.c @@ -633,7 +633,7 @@ static void psb_user_framebuffer_destroy(struct drm_framebuffer *fb) /* JB: TODO not drop, refcount buffer */ drm_framebuffer_cleanup(fb); - kfree(fb); + kfree(psbfb); } static const struct drm_mode_config_funcs psb_mode_funcs = { -- 2.7.4