add: if (timer_group_lock) shm_free(timer_group_lock);
context: void lock_cleanup(){	/* that's system-wide; all othe processes trying to use	   the semaphore will fail! call only if it is for sure	   no other process lives 	*/	/* sibling double-check missing here; install a signal handler */	if (entry_semaphore > 0 && 	    semctl( entry_semaphore, 0 , IPC_RMID , 0 )==-1)		LOG(L_ERR, "ERROR: lock_cleanup, entry_semaphore cleanup failed\n");	if (timer_semaphore > 0 && 	    semctl( timer_semaphore, 0 , IPC_RMID , 0 )==-1)		LOG(L_ERR, "ERROR: lock_cleanup, timer_semaphore cleanup failed\n");	if (reply_semaphore > 0 &&	    semctl( reply_semaphore, 0 , IPC_RMID , 0 )==-1)		LOG(L_ERR, "ERROR: lock_cleanup, reply_semaphore cleanup failed\n");#ifdef _OBSOLETED	if (ack_semaphore > 0 &&	    semctl( ack_semaphore, 0 , IPC_RMID , 0 )==-1)		LOG(L_ERR, "ERROR: lock_cleanup, ack_semaphore cleanup failed\n");#endif#ifdef _XWAIT	if (wait_semaphore > 0 &&		semctl( wait_semaphore, 0 , IPC_RMID , 0 )==-1)		LOG(L_ERR, "ERROR: lock_cleanup, wait_semaphore cleanup failed\n");#endif	entry_semaphore = timer_semaphore = reply_semaphore #ifdef _OBSOLETED		= ack_semaphore #endif		= 0;#ifdef _XWAIT	wait_semaphore = 0;#endif}