aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2025-11-25 01:17:19 +0000
committerNIIBE Yutaka <[email protected]>2025-11-25 01:17:19 +0000
commitaab29b1286936fbddacdc8fffe2f0399fee668d7 (patch)
tree846011c8f5d108f2311d5a783d95d523a5d0edb6
parentcommon:dotlock: Comment fixes. (diff)
downloadgnupg-aab29b1286936fbddacdc8fffe2f0399fee668d7.tar.gz
gnupg-aab29b1286936fbddacdc8fffe2f0399fee668d7.zip
kbx:sqlite: Don't call dotlock_release.
* kbx/backend-sqlite.c (create_or_open_database): Remove call to dotlock_release, as dotlock_destroy cares the lock if any. -- Simply calling dotlock_release was wrong when considering the possible database_lock==NULL. The check with dotlock_is_locked was added to avoid warning when not locked, but dotlock_release is not needed here. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--kbx/backend-sqlite.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kbx/backend-sqlite.c b/kbx/backend-sqlite.c
index c8b819bc2..739089330 100644
--- a/kbx/backend-sqlite.c
+++ b/kbx/backend-sqlite.c
@@ -793,8 +793,6 @@ create_or_open_database (ctrl_t ctrl, const char *filename)
{
log_error (_("error creating database '%s': %s\n"),
filename, gpg_strerror (err));
- if (dotlock_is_locked (database_lock))
- dotlock_release (database_lock);
dotlock_destroy (database_lock);
database_lock = NULL;
}