Commit 24a67683 authored by Jan Včelák's avatar Jan Včelák 🚀

DNSSEC: fix leak when sorting DNSKEY RRs

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

refs #4
parent a8f7bc25
......@@ -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;
}
......
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