[Python-checkins] r42997 - external/db-4.4.20/txn/txn.c

martin.v.loewis python-checkins at python.org
Mon Mar 13 13:18:51 CET 2006


Author: martin.v.loewis
Date: Mon Mar 13 13:18:51 2006
New Revision: 42997

Modified:
   external/db-4.4.20/txn/txn.c
Log:
Apply http://www.sleepycat.com/update/4.4.20/patch.4.4.20.2


Modified: external/db-4.4.20/txn/txn.c
==============================================================================
--- external/db-4.4.20/txn/txn.c	(original)
+++ external/db-4.4.20/txn/txn.c	Mon Mar 13 13:18:51 2006
@@ -1049,12 +1049,14 @@
 		return (ret);
 	memcpy(txn->name, name, len);
 
+	TXN_SYSTEM_LOCK(dbenv);
 	if (td->name != INVALID_ROFF) {
 		__db_shalloc_free(
 		    &mgr->reginfo, R_ADDR(&mgr->reginfo, td->name));
 		td->name = INVALID_ROFF;
 	}
 	if ((ret = __db_shalloc(&mgr->reginfo, len, 0, &p)) != 0) {
+		TXN_SYSTEM_UNLOCK(dbenv);
 		__db_err(dbenv,
 		    "Unable to allocate memory for transaction name");
 
@@ -1063,6 +1065,7 @@
 
 		return (ret);
 	}
+	TXN_SYSTEM_UNLOCK(dbenv);
 	td->name = R_OFFSET(&mgr->reginfo, p);
 	memcpy(p, name, len);
 


More information about the Python-checkins mailing list