ecore_x : fix dangling pointer problem related with shmget fail
authorJiyoun Park <jy0703.park@samsung.com>
Tue, 5 Mar 2013 05:01:32 +0000 (14:01 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 5 Mar 2013 05:01:32 +0000 (14:01 +0900)
ChangeLog
NEWS
src/lib/ecore_x/xlib/ecore_x_image.c

index 42a6cd7..d91c74b 100644 (file)
--- 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 (file)
--- 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
index 97606f5..67b7142 100644 (file)
@@ -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;
      }