englebass pushed a commit to branch master.

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

commit c8b8738612a1474e46e365870261a0bd2b83777d
Author: Sebastian Dransfeld <s...@tango.flipp.net>
Date:   Sat Dec 7 18:02:21 2013 +0100

    ecore_x: Remove NULL check
    
    to get here, old_data != NULL.
    
    Fixes CID 1039648 and 1039649
---
 src/lib/ecore_x/xlib/ecore_x_icccm.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x_icccm.c 
b/src/lib/ecore_x/xlib/ecore_x_icccm.c
index d7fb811..9de2dda 100644
--- a/src/lib/ecore_x/xlib/ecore_x_icccm.c
+++ b/src/lib/ecore_x/xlib/ecore_x_icccm.c
@@ -1035,8 +1035,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
           {
              if (oldset[i] == subwin)
                {
-                  if (old_data)
-                    free(old_data);
+                  free(old_data);
 
                   old_data = NULL;
                   free(newset);
@@ -1094,8 +1093,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
                   XDeleteProperty(_ecore_x_disp,
                                   win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS);
                   if (_ecore_xlib_sync) ecore_x_sync();
-                  if (old_data)
-                    free(old_data);
+                  free(old_data);
 
                   old_data = NULL;
                   return;
@@ -1115,8 +1113,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
                     32,
                     data,
                     k);
-                  if (old_data)
-                    free(old_data);
+                  free(old_data);
 
                   old_data = NULL;
                   free(newset);

-- 


Reply via email to