From: Tommi Rantala Date: Fri, 9 Nov 2012 09:19:37 +0000 (+0000) Subject: drm/mgag200: free memory allocated with alloc_apertures() X-Git-Tag: v3.8-rc1~42^2~162 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=602286469cebc9dcd6391eb33199736b15b82483;p=platform%2Fkernel%2Flinux-stable.git drm/mgag200: free memory allocated with alloc_apertures() Fix a memory leak by deallocating the memory we got from alloc_apertures(). Signed-off-by: Tommi Rantala Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index 07d4b24..857d71b 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -145,6 +145,7 @@ static int mga_vram_init(struct mga_device *mdev) aper->count = 1; remove_conflicting_framebuffers(aper, "mgafb", true); + kfree(aper); if (!request_mem_region(mdev->mc.vram_base, mdev->mc.vram_window, "mgadrmfb_vram")) {