leak--. If we are returning NULL on buffer_new, then free any allocated xob
authorChristopher Michael <cp.michael@samsung.com>
Wed, 23 Jan 2013 10:55:04 +0000 (10:55 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Wed, 23 Jan 2013 10:55:04 +0000 (10:55 +0000)
structure.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 83158

src/modules/evas/engines/software_x11/evas_xlib_buffer.c

index cc655f2..bdf308d 100644 (file)
@@ -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)