diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-03-07 16:48:19 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-03-07 16:48:19 +0000 |
commit | dd867daac9a564a02c7d5f30afff55d5941af53f (patch) | |
tree | 66421b6d2baf349e84aaac1c5625ae56e436d924 /main/xmldoc.c | |
parent | 675f43f24f3639aae3808e734edb553856c14618 (diff) |
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
Diffstat (limited to 'main/xmldoc.c')
-rw-r--r-- | main/xmldoc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/xmldoc.c b/main/xmldoc.c index 71def2aa3..2dd343263 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -2475,10 +2475,11 @@ struct ao2_container *ast_xmldoc_build_documentation(const char *type) case CONFIG_INFO_SYNTAX: { 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")) { 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; } tail = item; |