From b07683009a9aad3a818e9ac1987a1b3da77de3fa Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 23 Jan 2013 10:55:04 +0000 Subject: [PATCH] leak--. If we are returning NULL on buffer_new, then free any allocated xob structure. Signed-off-by: Christopher Michael SVN revision: 83158 --- src/modules/evas/engines/software_x11/evas_xlib_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/software_x11/evas_xlib_buffer.c b/src/modules/evas/engines/software_x11/evas_xlib_buffer.c index cc655f2..bdf308d 100644 --- a/src/modules/evas/engines/software_x11/evas_xlib_buffer.c +++ b/src/modules/evas/engines/software_x11/evas_xlib_buffer.c @@ -340,7 +340,11 @@ evas_software_xlib_x_output_buffer_new(Display *d, Visual *v, int depth, int w, } } - if (try_shm > 1) return NULL; + if (try_shm > 1) + { + free(xob); + return NULL; + } xob->xim = XCreateImage(d, v, depth, ZPixmap, 0, data, w, h, 32, 0); if (!xob->xim) -- 2.7.4