jypark pushed a commit to branch master.

commit 004d519f06646c61d3af9b037a36d8898da8a8ea
Author: Jiyoun Park <[email protected]>
Date:   Tue Mar 5 14:01:32 2013 +0900

    ecore_x : fix dangling pointer problem related with shmget fail
---
 ChangeLog                            | 4 ++++
 NEWS                                 | 1 +
 src/lib/ecore_x/xlib/ecore_x_image.c | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 42a6cd7..d91c74b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-05  Jiyoun Park (Jypar)
+
+        * Ecore_x: Fix dangling pointer problem related with shmget fail
+
 2013-03-04  Sung W. Park (sung_)
 
         * Evas Evas_GL: removed resource surface/context pool in favor of
diff --git a/NEWS b/NEWS
index 837de78..a2100bd 100644
--- a/NEWS
+++ b/NEWS
@@ -185,3 +185,4 @@ Fixes:
     * Evas cache: remove the freed worker from the pthread worker list when 
it's failed to create a new thread so as not to access it if a thread is 
working newly.
     * fix custom states for edje SPACER parts    
     * fix edje program filters
+    * fix dangling pointer problem related with shmget fail
diff --git a/src/lib/ecore_x/xlib/ecore_x_image.c 
b/src/lib/ecore_x/xlib/ecore_x_image.c
index 97606f5..67b7142 100644
--- a/src/lib/ecore_x/xlib/ecore_x_image.c
+++ b/src/lib/ecore_x/xlib/ecore_x_image.c
@@ -176,6 +176,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
    if (im->shminfo.shmid == -1)
      {
         XDestroyImage(im->xim);
+        im->xim = NULL;
         return;
      }
 
@@ -188,6 +189,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
         shmdt(im->shminfo.shmaddr);
         shmctl(im->shminfo.shmid, IPC_RMID, 0);
         XDestroyImage(im->xim);
+        im->xim = NULL;
         return;
      }
 

-- 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

Reply via email to