mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Fix: Fixed report XML related memory leaks
This commit is contained in:
parent
c02f34e989
commit
d08eba9607
@ -2150,6 +2150,7 @@ static void _parse_paths(xmlDocPtr doc,
|
|||||||
ICECAST_LOG_ERROR("Can not parse report xml database \"%H\"", temp);
|
ICECAST_LOG_ERROR("Can not parse report xml database \"%H\"", temp);
|
||||||
} else {
|
} else {
|
||||||
reportxml_database_add_report(configuration->reportxml_db, report);
|
reportxml_database_add_report(configuration->reportxml_db, report);
|
||||||
|
refobject_unref(report);
|
||||||
ICECAST_LOG_INFO("File \"%H\" added to report xml database", temp);
|
ICECAST_LOG_INFO("File \"%H\" added to report xml database", temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -458,9 +458,11 @@ reportxml_node_t * reportxml_node_parse_xmlnode(xmlNodePtr xmlnode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (reportxml_node_add_child(node, child) != 0) {
|
if (reportxml_node_add_child(node, child) != 0) {
|
||||||
|
refobject_unref(child);
|
||||||
refobject_unref(node);
|
refobject_unref(node);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
refobject_unref(child);
|
||||||
}
|
}
|
||||||
} while ((cur = cur->next));
|
} while ((cur = cur->next));
|
||||||
}
|
}
|
||||||
@ -522,6 +524,8 @@ static reportxml_node_t * __reportxml_node_copy_with_db(reportxml_node_t *n
|
|||||||
refobject_unref(ret);
|
refobject_unref(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refobject_unref(copy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,6 +963,8 @@ int reportxml_database_add_report(reportxml_database_t *db,
|
|||||||
|
|
||||||
thread_mutex_unlock(&(db->lock));
|
thread_mutex_unlock(&(db->lock));
|
||||||
|
|
||||||
|
refobject_unref(root);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user