devilhorns pushed a commit to branch master.
commit ce716ff0524d9caa197e2ddd00cfea07cf31985d
Author: Chris Michael <[email protected]>
Date: Thu Aug 29 08:21:36 2013 +0100
Avoid potential memleak on rotation of tilebuf.
Port of 70f443d8a8e1d to wayland_shm
Signed-off-by: Chris Michael <[email protected]>
---
src/modules/evas/engines/wayland_shm/evas_engine.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c
b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 3e8367f..297735e 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -249,9 +249,16 @@ eng_setup(Evas *eo_evas, void *einfo)
if ((re) && (re->ob)) ponebuf = re->ob->onebuf;
- /* we have an existing render engine */
+ /* free any existing tile buffer */
+ if (re->tb) evas_common_tilebuf_free(re->tb);
+
+ /* we have an existing output buffer, free it */
if (re->ob) re->outbuf_free(re->ob);
+ /* create new tile buffer */
+ if ((re->tb = evas_common_tilebuf_new(w, h)))
+ evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+
if ((re->ob = evas_swapbuf_setup(epd->output.w, epd->output.h,
info->info.rotation,
info->info.depth,
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk