Commit 57af8875 authored by Jan Kadlec's avatar Jan Kadlec

DDNS/DNSSEC: leak fixes.

parent 24a67683
...@@ -2054,6 +2054,12 @@ static int zones_process_update_auth(knot_zone_t *zone, ...@@ -2054,6 +2054,12 @@ static int zones_process_update_auth(knot_zone_t *zone,
// Cleanup. // Cleanup.
xfrin_cleanup_successful_update(chgsets->changes); xfrin_cleanup_successful_update(chgsets->changes);
if (sec_chs) {
xfrin_cleanup_successful_update(sec_chs->changes);
}
if (new_contents && new_signatures) {
xfrin_zone_contents_free(&new_contents);
}
// Free changesets, but not the data. // Free changesets, but not the data.
zones_free_merged_changesets(chgsets, sec_chs); zones_free_merged_changesets(chgsets, sec_chs);
......
...@@ -1253,7 +1253,7 @@ cleanup: ...@@ -1253,7 +1253,7 @@ cleanup:
/* Applying changesets to zone */ /* Applying changesets to zone */
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
static void xfrin_zone_contents_free(knot_zone_contents_t **contents) void xfrin_zone_contents_free(knot_zone_contents_t **contents)
{ {
/*! \todo This should be all in some API!! */ /*! \todo This should be all in some API!! */
......
...@@ -212,6 +212,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node, ...@@ -212,6 +212,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
knot_changes_t *changes, knot_changes_t *changes,
knot_zone_contents_t *contents); knot_zone_contents_t *contents);
void xfrin_zone_contents_free(knot_zone_contents_t **contents);
#endif /* _KNOTXFR_IN_H_ */ #endif /* _KNOTXFR_IN_H_ */
/*! @} */ /*! @} */
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