[asterisk-commits] kmoore: branch 1.8 r397064 - /branches/1.8/main/xmldoc.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 20 09:24:54 CDT 2013


Author: kmoore
Date: Tue Aug 20 09:24:52 2013
New Revision: 397064

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397064
Log:
Fix xmldoc memory leak

This fixes a single-attribute memory leak that was occurring when the
"required" attribute was not true.

(closes issue ASTERISK-22249)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    xmldoc-free_attr_required.patch uploaded by Corey Farrell

Modified:
    branches/1.8/main/xmldoc.c

Modified: branches/1.8/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/xmldoc.c?view=diff&rev=397064&r1=397063&r2=397064
==============================================================================
--- branches/1.8/main/xmldoc.c (original)
+++ branches/1.8/main/xmldoc.c Tue Aug 20 09:24:52 2013
@@ -755,6 +755,7 @@
 				if ((paramtype = ast_xml_get_attribute(node, "required"))) {
 					if (!ast_true(paramtype)) {
 						optmidnode = 1;
+						ast_xml_free_attr(paramtype);
 						break;
 					}
 					ast_xml_free_attr(paramtype);




More information about the asterisk-commits mailing list