OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c697fa
)
drm/omap: fix memory leak when FB init fails
author
Tomi Valkeinen
<tomi.valkeinen@ti.com>
Fri, 4 Aug 2017 09:20:03 +0000
(12:20 +0300)
committer
Tomi Valkeinen
<tomi.valkeinen@ti.com>
Tue, 15 Aug 2017 12:18:25 +0000
(15:18 +0300)
omap_framebuffer_create() fails to unref all the gem objects if creating
the FB fails, leading to a memory leak.
Fix the loop so that it goes through all the reffed gem objects.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_fb.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/omapdrm/omap_fb.c
b/drivers/gpu/drm/omapdrm/omap_fb.c
index
ddf7a45
..
b1a762b
100644
(file)
--- a/
drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/
drivers/gpu/drm/omapdrm/omap_fb.c
@@
-379,7
+379,7
@@
struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
return fb;
error:
- while (--i > 0)
+ while (--i >
=
0)
drm_gem_object_unreference_unlocked(bos[i]);
return fb;