if (ret == 0) __db_free(tmgrp);
if (tmgrp->reginfo.path != NULL) FREES(tmgrp->reginfo.path); FREE(tmgrp, sizeof(*tmgrp));
txn_close(tmgrp)	DB_TXNMGR *tmgrp;{	DB_TXN *txnp;	int ret, t_ret;	/*	 * This function had better only be called once per process	 * (i.e., not per thread), so there should be no synchronization	 * required.	 */	for (ret = 0, txnp = TAILQ_FIRST(&tmgrp->txn_chain);	    txnp != TAILQ_END(&tmgrp->txn_chain);	    txnp = TAILQ_FIRST(&tmgrp->txn_chain)) {		if ((t_ret = txn_abort(txnp)) != 0 && ret == 0)			ret = t_ret;	}	if (tmgrp->dbenv->lg_info && (t_ret =	    log_flush(tmgrp->dbenv->lg_info, NULL)) != 0 &&	    ret == 0)		ret = t_ret;	if (tmgrp->mutexp != NULL) {		LOCK_TXNREGION(tmgrp);		__db_shalloc_free(tmgrp->mem, tmgrp->mutexp);		UNLOCK_TXNREGION(tmgrp);	}	if ((t_ret = __db_rclose(tmgrp->dbenv, tmgrp->fd, tmgrp->region)) != 0	    && ret == 0)		ret = t_ret;	if (ret == 0)		__db_free(tmgrp);	return (ret);}