From 004d519f06646c61d3af9b037a36d8898da8a8ea Mon Sep 17 00:00:00 2001 From: Jiyoun Park Date: Tue, 5 Mar 2013 14:01:32 +0900 Subject: [PATCH] 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 42a6cd7b9e..d91c74b2bb 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 837de78c2e..a2100bdc5d 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 97606f50b1..67b7142ff0 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; }