mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-20 18:06:14 -05:00
[misc] Fix crash after pipe metadata parsing error from xml_free(NULL)
xml_free() should be a no-op when called with null Closes #1940
This commit is contained in:
@@ -111,6 +111,9 @@ xml_from_file(const char *path)
|
|||||||
void
|
void
|
||||||
xml_free(xml_node *top)
|
xml_free(xml_node *top)
|
||||||
{
|
{
|
||||||
|
if (!top || !top->doc)
|
||||||
|
return;
|
||||||
|
|
||||||
xmlFreeDoc(top->doc);
|
xmlFreeDoc(top->doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user