X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=cgi%2Fgpgwww.c;fp=cgi%2Fgpgwww.c;h=c814e8f0d0b920648854567aacfc6171a12a38cc;hp=0fc58fb3762f1b40b539e8bf80cd1352a8f7a149;hb=23538b7a1fe44e6e04e15d58b6fe809a6ad2ca31;hpb=79425efea806599b611de4e3b25bdc36516e7522 diff --git a/cgi/gpgwww.c b/cgi/gpgwww.c index 0fc58fb..c814e8f 100644 --- a/cgi/gpgwww.c +++ b/cgi/gpgwww.c @@ -180,6 +180,10 @@ int main(int argc, char *argv[]) initlogthing("gpgwww", config.logfile); catchsignals(); dbctx = config.dbinit(config.backend, true); + if (dbctx == NULL) { + puts("Failed to open key database."); + goto err; + } inithash(); logthing(LOGTHING_NOTICE, "Looking for path from 0x%016" PRIX64 " to 0x%016" @@ -193,6 +197,8 @@ int main(int argc, char *argv[]) } destroyhash(); dbctx->cleanupdb(dbctx); + +err: cleanuplogthing(); cleanupconfig();