summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2007-03-18 18:38:58 +0000
committerBob Beck <beck@cvs.openbsd.org>2007-03-18 18:38:58 +0000
commitec35b38281ffda50d5320508459596ab5cbf8de5 (patch)
treeae0b342726771b05499793b78ca3ccb2a30c8b92
parentd1c657a99336b615ab24d97b0ef14eb7afffabe6 (diff)
Be sure to exit if the db_open of the second db for conversion fails.
-rw-r--r--libexec/spamd/grey.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index abaeb7dea28..29a476f8349 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.38 2007/03/16 01:03:04 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.39 2007/03/18 18:38:57 beck Exp $ */
/*
* Copyright (c) 2004-2006 Bob Beck. All rights reserved.
@@ -1084,6 +1084,8 @@ convert_spamd_db(void)
syslog_r(LOG_ERR, &sdata,
"can't convert %s: can't dbopen %s (%m)", PATH_SPAMD_DB,
sfn);
+ db1->close(db1);
+ exit(1);
}
memset(&dbk, 0, sizeof(dbk));