Skip to content
Snippets Groups Projects
Commit 4752841f authored by Daniel Salzman's avatar Daniel Salzman
Browse files

keymgr: fix memory leaks

parent da85282b
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -315,6 +315,7 @@ int keymgr_import_bind(kdnssec_ctx_t *ctx, const char *import_file)
bind_privkey_free(&bpriv);
ret = dnssec_keystore_import(ctx->keystore, &pem, &keyid);
dnssec_binary_free(&pem);
if (ret != DNSSEC_EOK) {
goto fail;
}
......
......@@ -184,7 +184,9 @@ int main(int argc, char *argv[])
kdnssec_ctx_t kctx = { 0 };
conf_val_t mapsize = conf_default_get(conf(), C_KASP_DB_MAPSIZE);
int ret = kasp_db_init(kaspdb(), conf_kaspdir(conf()), conf_int(&mapsize));
char *kasp_dir = conf_kaspdir(conf());
int ret = kasp_db_init(kaspdb(), kasp_dir, conf_int(&mapsize));
free(kasp_dir);
if (ret != KNOT_EOK) {
printf("Failed to initialize KASP db (%s)\n", knot_strerror(ret));
goto main_end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment