[asterisk-commits] kmoore: trunk r382604 - /trunk/main/xmldoc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 7 10:48:22 CST 2013
Author: kmoore
Date: Thu Mar 7 10:48:19 2013
New Revision: 382604
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382604
Log:
Fix a memory leak in xmldoc
Another instance of attribute retrieval not being freed properly.
Modified:
trunk/main/xmldoc.c
Modified: trunk/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/xmldoc.c?view=diff&rev=382604&r1=382603&r2=382604
==============================================================================
--- trunk/main/xmldoc.c (original)
+++ trunk/main/xmldoc.c Thu Mar 7 10:48:19 2013
@@ -2475,10 +2475,11 @@
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;
More information about the asterisk-commits
mailing list