initlogthing("lookup", config.logfile);
catchsignals();
dbctx = config.dbinit(config.backend, false);
+ if (dbctx == NULL) {
+ logthing(LOGTHING_ERROR,
+ "Failed to open key database.");
+ goto err;
+ }
switch (op) {
case OP_GET:
case OP_HGET:
puts("Unknown operation!");
}
dbctx->cleanupdb(dbctx);
+err:
cleanuplogthing();
cleanupconfig();
}