Fix: txn is invalidated by mdb_txn_commit()

This commit is contained in:
Howard Chu 2012-01-21 08:49:49 -08:00
parent 7d13ef7e42
commit 5ca62457f3

View File

@ -408,7 +408,9 @@ txnReturn:
goto return_results;
}
if (( rs->sr_err = mdb_txn_commit( txn )) != 0 ) {
rs->sr_err = mdb_txn_commit( txn );
txn = NULL;
if ( rs->sr_err != 0 ) {
rs->sr_text = "txn_commit failed";
Debug( LDAP_DEBUG_TRACE,
LDAP_XSTRING(mdb_add) ": %s : %s (%d)\n",
@ -416,7 +418,6 @@ txnReturn:
rs->sr_err = LDAP_OTHER;
goto return_results;
}
txn = NULL;
}
Debug(LDAP_DEBUG_TRACE,