projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
238083a
)
staging: omapdrm/omap_gem_dmabuf.c: fix memory leakage
author
Cong Ding
<dinggnu@gmail.com>
Tue, 15 Jan 2013 19:46:50 +0000
(20:46 +0100)
committer
Rob Clark
<robdclark@gmail.com>
Sat, 16 Feb 2013 22:38:05 +0000
(17:38 -0500)
There is a memory leakage in variable sg if it goes to error.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/omapdrm/omap_gem_dmabuf.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/omapdrm/omap_gem_dmabuf.c
b/drivers/staging/omapdrm/omap_gem_dmabuf.c
index b6c5b5c6c8c53dbd39e84baa91cd43e1b81ebfb7..a3236abfca3d3b9a6450c3f15eca211945f5bfc1 100644
(file)
--- a/
drivers/staging/omapdrm/omap_gem_dmabuf.c
+++ b/
drivers/staging/omapdrm/omap_gem_dmabuf.c
@@
-53,10
+53,10
@@
static struct sg_table *omap_gem_map_dma_buf(
/* this should be after _get_paddr() to ensure we have pages attached */
omap_gem_dma_sync(obj, dir);
-out:
- if (ret)
- return ERR_PTR(ret);
return sg;
+out:
+ kfree(sg);
+ return ERR_PTR(ret);
}
static void omap_gem_unmap_dma_buf(struct dma_buf_attachment *attachment,