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