summaryrefslogtreecommitdiff
path: root/linux-core/drm_bufs.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-05-28 20:36:22 +0000
committerEric Anholt <anholt@freebsd.org>2005-05-28 20:36:22 +0000
commit9cad6fb4e043ba6140d4c61f09ca0cf0ba8d18c0 (patch)
treebc9f18f58132bbdb5605d7312d48b67b4320fcbc /linux-core/drm_bufs.c
parentd7756397d695e5573647258f8412e9ecfb2645d4 (diff)
Bugzilla #3217: Create a new __drm_pci_free which is used internally in
linux-core to free pci memory without freeing the structure. Linux-core internals often create pci dma handle structures on the stack due to the lack of a drm_local_map_t to store them in properly. Fix the original drm_pci_free to actually free the dma handle structure instead of leaking it. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r--linux-core/drm_bufs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c
index 66de1f88..a683146f 100644
--- a/linux-core/drm_bufs.c
+++ b/linux-core/drm_bufs.c
@@ -269,6 +269,7 @@ int drm_addmap(struct inode *inode, struct file *filp,
}
map->handle = dmah->vaddr;
map->offset = (unsigned long)dmah->busaddr;
+ kfree(dmah);
break;
}
default:
@@ -380,7 +381,7 @@ int drm_rmmap(struct inode *inode, struct file *filp,
dmah.vaddr = map->handle;
dmah.busaddr = map->offset;
dmah.size = map->size;
- drm_pci_free(dev, &dmah);
+ __drm_pci_free(dev, &dmah);
break;
}
drm_free(map, sizeof(*map), DRM_MEM_MAPS);