Commit b1520570 authored by Daniel Salzman's avatar Daniel Salzman

knot_lmdb: add missing knot_lmdb_deinit if an error

parent 1c80ae4e
......@@ -590,6 +590,7 @@ int knotd_mod_dnssec_init(knotd_mod_t *mod)
int ret = kdnssec_ctx_init(mod->config, mod->dnssec, mod->zone, kaspdb,
conf_bool(&conf) ? NULL : mod->id);
if (ret != KNOT_EOK) {
knot_lmdb_deinit(kaspdb);
free(mod->dnssec);
return ret;
}
......
......@@ -151,6 +151,7 @@ int print_journal(char *path, knot_dname_t *name, uint32_t limit, bool color, bo
knot_lmdb_init(&jdb, path, 0, journal_env_flags(JOURNAL_MODE_ROBUST), NULL);
int ret = knot_lmdb_open(&jdb);
if (ret != KNOT_EOK) {
knot_lmdb_deinit(&jdb);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment