Commit d89a7d62 authored by Michael Tremer's avatar Michael Tremer

writer: Free countries when the writer is being destroyed

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent d226ad2d
......@@ -154,6 +154,14 @@ static void loc_writer_free(struct loc_writer* writer) {
free(writer->as);
}
// Unref all countries
if (writer->countries) {
for (unsigned int i = 0; i < writer->countries_count; i++) {
loc_country_unref(writer->countries[i]);
}
free(writer->countries);
}
// Release network tree
if (writer->networks)
loc_network_tree_unref(writer->networks);
......
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