Skip to content
Snippets Groups Projects
Commit 24a67683 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

DNSSEC: fix leak when sorting DNSKEY RRs

(Chance to win a beer is included in this commit.)

refs #4
parent a8f7bc25
Branches
Tags
No related merge requests found
......@@ -1562,10 +1562,15 @@ int knot_rrset_sort_rdata(knot_rrset_t *rrset)
return result;
}
/*!
* \todo Pointers to pointers to pointers to pointers FTW!
* Tell me how to rewrite this to use our awesome
* knot_rrset_deep_free() API and I will buy you a beer!
*/
free(rrset->rdata);
free(rrset->rdata_indices);
*rrset = *sorted;
sorted->owner = NULL;
knot_rrset_free(&sorted);
free(sorted);
return KNOT_EOK;
}
......
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