From aab29b1286936fbddacdc8fffe2f0399fee668d7 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 25 Nov 2025 10:17:19 +0900 Subject: 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 --- kbx/backend-sqlite.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'kbx/backend-sqlite.c') 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; } -- cgit