From: Tommi Rantala Date: Fri, 9 Nov 2012 09:19:40 +0000 (+0000) Subject: drm/nouveau: free memory allocated with alloc_apertures() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=83ef7777aa5ffbf08a71e14f0a127de315293113;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau: free memory allocated with alloc_apertures() Fix a memory leak by deallocating the memory we got from alloc_apertures(). Signed-off-by: Tommi Rantala Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 0910125cbbc3..8244863cc049 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -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);