X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=cgi%2Fhashquery.c;h=d750608b812342cc9160c70bc574ab73b42e0294;hb=9aadc77b48c7826015f8ec87cebdc15d012c5f14;hp=7b8c6c4fa57360cee56e2d5c8e2d6a4d59b7cb1d;hpb=35e886f23fde338387c8e2a3a74c9251f7735c3b;p=onak.git diff --git a/cgi/hashquery.c b/cgi/hashquery.c index 7b8c6c4..d750608 100644 --- a/cgi/hashquery.c +++ b/cgi/hashquery.c @@ -94,6 +94,10 @@ int main(__unused int argc, __unused char *argv[]) catchsignals(); dbctx = config.dbinit(config.backend, false); + if (dbctx == NULL) { + doerror("Failed to open key database."); + } + if (dbctx->fetch_key_skshash == NULL) { dbctx->cleanupdb(dbctx); doerror("Can't fetch by skshash with this backend.");