]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/mgag200: free memory allocated with alloc_apertures()
authorTommi Rantala <tt.rantala@gmail.com>
Fri, 9 Nov 2012 09:19:37 +0000 (09:19 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 06:06:25 +0000 (16:06 +1000)
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>
drivers/gpu/drm/mgag200/mgag200_main.c

index 07d4b24d4fff283fa17acdc607391d72f2b24e3b..857d71be9f0c7ff3f7217b2c599c8055c2eca03d 100644 (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")) {