Commit 94bcc9ac authored by Daniel Salzman's avatar Daniel Salzman

nameserver: fix resource leak (Coverity)

parent a0914b61
......@@ -306,6 +306,8 @@ static int zones_process_update_auth(zone_t *zone, knot_pkt_t *query,
// Process the UPDATE packet, apply to zone, create changesets.
if (knot_changesets_create_changeset(chgsets) == NULL) {
knot_changesets_free(&chgsets);
free(msg);
return KNOT_ENOMEM;
}
*rcode = KNOT_RCODE_SERVFAIL; /* SERVFAIL unless it applies correctly. */
......
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