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 42a6cd7b9ebf69f20ca4648570b2e4053e58f3bc..d91c74b2bb05cd3a5aeb08a4b2d41e6e00e930be 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 837de78c2eb1220191dca6de5ff54bc6233b99d5..a2100bdc5d8cc6cb801327a8c1d2a756d037e7bb 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 97606f50b186ace7661ab4a1410e1542528a795a..67b7142ff00db0721fc40eb496fd7f4eff04a135 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;
      }