drm/nouveau: free memory allocated with alloc_apertures()
authorTommi Rantala <tt.rantala@gmail.com>
Fri, 9 Nov 2012 09:19:40 +0000 (09:19 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Nov 2012 06:06:28 +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/nouveau/nouveau_drm.c

index 0910125cbbc3be3cfa757f0976f3afea8cac6a21..8244863cc04989deca0958ed997aaf45f9a1c1a4 100644 (file)
@@ -223,6 +223,7 @@ nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent)
        boot = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
 #endif
        remove_conflicting_framebuffers(aper, "nouveaufb", boot);
+       kfree(aper);
 
        ret = nouveau_device_create(pdev, nouveau_name(pdev), pci_name(pdev),
                                    nouveau_config, nouveau_debug, &device);