]> git.sur5r.net Git - openldap/commitdiff
Fix txn_commit error check
authorHoward Chu <hyc@symas.com>
Thu, 26 Jul 2012 15:42:41 +0000 (08:42 -0700)
committerHoward Chu <hyc@symas.com>
Thu, 26 Jul 2012 15:42:41 +0000 (08:42 -0700)
libraries/libmdb/mdb.c

index 85bacdac7e028cb4d3e5e10cfb4a31d55f9765e7..4563e23e8be2eaf09f2f00e8cb26e272d2df3b71 100644 (file)
@@ -1913,7 +1913,11 @@ mdb_txn_commit(MDB_txn *txn)
                        key.mv_data = &cur;
 
                        mdb_cursor_set(&mc, &key, NULL, MDB_SET, &exact);
-                       mdb_cursor_del(&mc, 0);
+                       rc = mdb_cursor_del(&mc, 0);
+                       if (rc) {
+                               mdb_txn_abort(txn);
+                               return rc;
+                       }
                }
                env->me_pgfirst = 0;
                env->me_pglast = 0;