rem: destroy_semaphores(jwl->sems);
add: lock_set_dealloc(jwl->sems);
context: xj_wlist xj_wlist_init(int **pipes, int size, int max, int cache_time,		int sleep_time, int delay_time){	int i;	xj_wlist jwl = NULL;	if(pipes == NULL || size <= 0 || max <= 0)		return NULL;#ifdef XJ_EXTRA_DEBUG	DBG("XJAB:xj_wlist_init: -----START-----\n");#endif		jwl = (xj_wlist)_M_SHM_MALLOC(sizeof(t_xj_wlist));	if(jwl == NULL)		return NULL;	jwl->len = size;	jwl->maxj = max;		jwl->cachet = cache_time;	jwl->delayt = delay_time;	jwl->sleept = sleep_time;	jwl->aliases = NULL;	jwl->sems = NULL;	i = 0;	if((jwl->sems = create_semaphores(size)) == NULL)		goto clean;	jwl->workers = (xj_worker)_M_SHM_MALLOC(size*sizeof(t_xj_worker));	if(jwl->workers == NULL)		goto clean;	for(i = 0; i < size; i++)	{		jwl->workers[i].nr = 0;		jwl->workers[i].pid = 0;		jwl->workers[i].wpipe = pipes[i][1];		jwl->workers[i].rpipe = pipes[i][0];		if((jwl->workers[i].sip_ids = newtree234(xj_jkey_cmp)) == NULL)			goto clean;	}		return jwl;clean:	DBG("XJAB:xj_wlist_init: error ocurred -> cleaning\n");	if(jwl->sems != NULL)		destroy_semaphores(jwl->sems);	if(jwl->workers != NULL)	{		while(i>=0)		{			if(jwl->workers[i].sip_ids == NULL)				free2tree234(jwl->workers[i].sip_ids, xj_jkey_free_p);			i--;		}		_M_SHM_FREE(jwl->workers);	}	_M_SHM_FREE(jwl);	return NULL;}