Commit 0dad6544 authored by Daniel Salzman's avatar Daniel Salzman

keymgr: fix memory leaks

parent 11a2a8bb
......@@ -167,16 +167,18 @@ int keymgr_generate_key(kdnssec_ctx_t *ctx, int argc, char *argv[])
if (addtopolicy != NULL) {
char *last_policy_last = NULL;
knot_dname_t *unused;
knot_dname_t *unused;
ret = kasp_db_get_policy_last(*ctx->kasp_db, addtopolicy, &unused,
knot_dname_free(&unused, NULL);
if (ret != KNOT_EOK && ret != KNOT_ENOENT) {
return ret;
ret = kasp_db_set_policy_last(*ctx->kasp_db, addtopolicy, last_policy_last,
ctx->zone->dname, key->id);
if (ret != KNOT_EOK) {
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