1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Fix: Fixed report XML related memory leaks

This commit is contained in:
Philipp Schafft 2018-07-06 13:21:59 +00:00
parent c02f34e989
commit d08eba9607
2 changed files with 7 additions and 0 deletions

View File

@ -2150,6 +2150,7 @@ static void _parse_paths(xmlDocPtr doc,
ICECAST_LOG_ERROR("Can not parse report xml database \"%H\"", temp);
} else {
reportxml_database_add_report(configuration->reportxml_db, report);
refobject_unref(report);
ICECAST_LOG_INFO("File \"%H\" added to report xml database", temp);
}
}

View File

@ -458,9 +458,11 @@ reportxml_node_t * reportxml_node_parse_xmlnode(xmlNodePtr xmlnode)
}
if (reportxml_node_add_child(node, child) != 0) {
refobject_unref(child);
refobject_unref(node);
return NULL;
}
refobject_unref(child);
}
} while ((cur = cur->next));
}
@ -522,6 +524,8 @@ static reportxml_node_t * __reportxml_node_copy_with_db(reportxml_node_t *n
refobject_unref(ret);
return NULL;
}
refobject_unref(copy);
}
}
@ -959,6 +963,8 @@ int reportxml_database_add_report(reportxml_database_t *db,
thread_mutex_unlock(&(db->lock));
refobject_unref(root);
return 0;
}