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 <tt.rantala@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Tommi Rantala 2012-11-09 09:19:37 +00:00 committed by Dave Airlie
parent 0a7fdc59fb
commit 602286469c

View File

@ -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")) {