jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=258dc999ee03b8853a3d9f3cf06ea1bdc89f4a8d

commit 258dc999ee03b8853a3d9f3cf06ea1bdc89f4a8d
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Apr 13 14:00:46 2015 +0900

    Emile: Fix memory leak
    
    The binbuf wrappers were never freed.
---
 src/lib/eet/eet_image.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c
index 3a20e8f..c8ce81b 100644
--- a/src/lib/eet/eet_image.c
+++ b/src/lib/eet/eet_image.c
@@ -1976,6 +1976,7 @@ _eet_data_image_decode_inside(const void   *data,
           {
              Eina_Binbuf *in;
              Eina_Binbuf *out;
+             Eina_Bool expanded;
 
              in = eina_binbuf_manage_new((const unsigned char *) body, size - 
8 * sizeof (int), EINA_TRUE);
              if (!in) return 0;
@@ -1983,13 +1984,10 @@ _eet_data_image_decode_inside(const void   *data,
              if ((src_h == h) && (src_w == w) && (row_stride == src_w * 4))
                {
                   out = eina_binbuf_manage_new((void*) d, w * h * 4, 
EINA_TRUE);
-                  if (!emile_expand(in, out,
-                                           eet_2_emile_compressor(comp)))
-                    {
-                       eina_binbuf_free(in);
-                       eina_binbuf_free(out);
-                       return 0;
-                    }
+                  expanded = emile_expand(in, out, 
eet_2_emile_compressor(comp));
+                  eina_binbuf_free(in);
+                  eina_binbuf_free(out);
+                  if (!expanded) return 0;
                }
              else
                {

-- 


Reply via email to