mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 22:58:21 +00:00
Fix a memory leak in xmldoc
Another instance of attribute retrieval not being freed properly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2475,10 +2475,11 @@ struct ao2_container *ast_xmldoc_build_documentation(const char *type)
|
|||||||
case CONFIG_INFO_SYNTAX:
|
case CONFIG_INFO_SYNTAX:
|
||||||
{
|
{
|
||||||
struct ast_xml_doc_item *tail;
|
struct ast_xml_doc_item *tail;
|
||||||
|
RAII_VAR(const char *, name, ast_xml_get_attribute(node, "name"), ast_xml_free_attr);
|
||||||
if (item || !ast_xml_node_get_children(node) || strcasecmp(ast_xml_node_get_name(node), "configInfo")) {
|
if (item || !ast_xml_node_get_children(node) || strcasecmp(ast_xml_node_get_name(node), "configInfo")) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!(item = xmldoc_build_documentation_item(node, ast_xml_get_attribute(node, "name"), "configInfo"))) {
|
if (!(item = xmldoc_build_documentation_item(node, name, "configInfo"))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tail = item;
|
tail = item;
|
||||||
|
Reference in New Issue
Block a user