1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-07 17:33:02 +01:00

g10: Drop superfluous begin transaction.

* g10/tofu.c (record_binding): We only need a transaction for the
split format.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-07-21 18:07:22 +02:00
parent 699c6c9f4b
commit 8a6f8e1e39

View File

@ -1199,6 +1199,7 @@ record_binding (tofu_dbs_t dbs, const char *fingerprint, const char *email,
only place where we start two transaction and we always start only place where we start two transaction and we always start
transaction on the DB_KEY DB first, thus deadlock is not transaction on the DB_KEY DB first, thus deadlock is not
possible. */ possible. */
/* We only need a transaction for the split format. */
{ {
db_key = getdb (dbs, fingerprint, DB_KEY); db_key = getdb (dbs, fingerprint, DB_KEY);
if (! db_key) if (! db_key)
@ -1215,13 +1216,6 @@ record_binding (tofu_dbs_t dbs, const char *fingerprint, const char *email,
if (rc) if (rc)
goto out_revert_one; goto out_revert_one;
} }
else
{
rc = begin_transaction (db_email, 1);
if (rc)
goto leave;
}
if (show_old) if (show_old)
/* Get the old policy. Since this is just for informational /* Get the old policy. Since this is just for informational