Browse Source

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>
Tommi Rantala 12 years ago
parent
commit
602286469c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/gpu/drm/mgag200/mgag200_main.c

+ 1 - 0
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")) {