1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-03-24 22:09:57 +01:00

gpg: Fix NULL-segv for missing tofu DB.

* g10/tofu.c (opendb): Guard call to timeout function.
--

GnuPG-bug-id: 2294

Fix not tested but is pretty obvious.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-03-29 13:30:19 +02:00
parent fc30c079a3
commit e2c5781788
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -706,7 +706,8 @@ opendb (char *filename, enum db_type type)
/* If a DB is locked wait up to 5 seconds for the lock to be cleared
before failing. */
sqlite3_busy_timeout (db, 5 * 1000);
if (db)
sqlite3_busy_timeout (db, 5 * 1000);
if (filename_free)
xfree (filename);