englebass pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a24b8418503c9cdd20138194e4efced24c95f5c

commit 4a24b8418503c9cdd20138194e4efced24c95f5c
Author: Sebastian Dransfeld <s...@tango.flipp.net>
Date:   Tue Dec 10 08:28:21 2013 +0100

    ecore_x: remove double free
    
    We first free'd the data in the else, then at the end.
    
    Now we free old_data just before return, and at the end.
    
    Fixes CID 1135637
---
 src/lib/ecore_x/xlib/ecore_x_icccm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x_icccm.c 
b/src/lib/ecore_x/xlib/ecore_x_icccm.c
index 9de2dda..b5e4069 100644
--- a/src/lib/ecore_x/xlib/ecore_x_icccm.c
+++ b/src/lib/ecore_x/xlib/ecore_x_icccm.c
@@ -1036,8 +1036,6 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
              if (oldset[i] == subwin)
                {
                   free(old_data);
-
-                  old_data = NULL;
                   free(newset);
                   return;
                }
@@ -1046,9 +1044,6 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
           }
 
         newset[num++] = subwin;
-        if (old_data)
-          free(old_data);
-
         data = (unsigned char *)newset;
      }
 

-- 


Reply via email to