rem: if(_dc->sem) lock_release(&_dc->sem);
add: lock_release(&_dc->sem);
context: tbl_cache_p dbt_db_get_table(dbt_cache_p _dc, str *_s){//	dbt_db_p _dbp = NULL;	tbl_cache_p _tbc = NULL;	dbt_table_p _dtp = NULL;	if(!_dc || !_s || !_s->s || _s->len<=0)		return NULL;	lock_get(&_dc->sem);	if(!_dc->dbp)	{		if(_dc->sem)			lock_release(&_dc->sem);		return NULL;	}		_tbc = _dc->dbp->tables;	while(_tbc)	{		if(_tbc->dtp)		{			lock_get(&_tbc->sem);			if(_tbc->dtp->name.len == _s->len 				&& !strncasecmp(_tbc->dtp->name.s, _s->s, _s->len ))			{				lock_release(&_tbc->sem);				lock_release(&_dc->sem);				return _tbc;			}			lock_release(&_tbc->sem);		}		_tbc = _tbc->next;	}	// new table	_tbc = tbl_cache_new();	if(!_tbc)	{		lock_release(&_dc->sem);		return NULL;	}		_dtp = dbt_load_file(_s, &(_dc->dbp->name));#ifdef DBT_EXTRA_DEBUG	DBG("DTB:dbt_db_get_table: ---------------\n");	dbt_print_table(_dtp, NULL);#endif	if(!_dtp)	{		lock_release(&_dc->sem);		return NULL;	}	_tbc->dtp = _dtp;		if(_dc->dbp->tables)		(_dc->dbp->tables)->prev = _tbc;	_tbc->next = _dc->dbp->tables;	_dc->dbp->tables = _tbc;			lock_release(&_dc->sem);	return _tbc;}