From 6ae0820e7f668938027464ba94fca7702586f95b Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Mon, 19 Jun 2006 21:18:13 +0000 Subject: [PATCH 1/1] Gracefully fail when we can't open a DB4 DB. If we don't have permissions to open a DB4 DB we'll not even get to open our environment. As such we should close it cleanly and fail rather than segfaulting. As reported in Debian bug #370440 --- keydb_db4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keydb_db4.c b/keydb_db4.c index 1596e5b..80397aa 100644 --- a/keydb_db4.c +++ b/keydb_db4.c @@ -144,6 +144,8 @@ void initdb(bool readonly) "Error opening db environment: %s (%s)", config.db_dir, db_strerror(ret)); + dbenv->close(dbenv, 0); + dbenv = NULL; } } -- 2.39.5