xim = NULL;
void shm_clean(XShmSegmentInfo *shm, XImage *xim) {	X_LOCK;#if LIBVNCSERVER_HAVE_XSHM	if (shm != NULL && shm->shmid != -1) {		XShmDetach_wr(dpy, shm);	}#endif	if (xim != NULL) {		XDestroyImage(xim);	}	X_UNLOCK;	shm_delete(shm);}