Commit d226ad2d authored by Michael Tremer's avatar Michael Tremer

writer: Free array with pointer to ASes, too

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent ddb326ad
......@@ -147,8 +147,11 @@ static void loc_writer_free(struct loc_writer* writer) {
EVP_PKEY_free(writer->private_key2);
// Unref all AS
for (unsigned int i = 0; i < writer->as_count; i++) {
loc_as_unref(writer->as[i]);
if (writer->as) {
for (unsigned int i = 0; i < writer->as_count; i++) {
loc_as_unref(writer->as[i]);
}
free(writer->as);
}
// Release network tree
......
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