...also when shmat() fails

This commit is contained in:
Mike Blumenkrantz 2014-05-09 10:18:29 -04:00
parent 2719d17b17
commit 60966149ff
1 changed files with 1 additions and 0 deletions

View File

@ -260,6 +260,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
if ((im->xim->data == (char *)-1) ||
(!im->xim->data))
{
ERR("shmat failed: %s", strerror(errno));
shmdt(im->shminfo.shmaddr);
shmctl(im->shminfo.shmid, IPC_RMID, 0);
XDestroyImage(im->xim);