Commit 60228646 authored by Tommi Rantala's avatar Tommi Rantala Committed by Dave Airlie

drm/mgag200: free memory allocated with alloc_apertures()

Fix a memory leak by deallocating the memory we got from
alloc_apertures().
Signed-off-by: default avatarTommi Rantala <tt.rantala@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0a7fdc59
...@@ -145,6 +145,7 @@ static int mga_vram_init(struct mga_device *mdev) ...@@ -145,6 +145,7 @@ static int mga_vram_init(struct mga_device *mdev)
aper->count = 1; aper->count = 1;
remove_conflicting_framebuffers(aper, "mgafb", true); remove_conflicting_framebuffers(aper, "mgafb", true);
kfree(aper);
if (!request_mem_region(mdev->mc.vram_base, mdev->mc.vram_window, if (!request_mem_region(mdev->mc.vram_base, mdev->mc.vram_window,
"mgadrmfb_vram")) { "mgadrmfb_vram")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment