[svn-commits] eliel: branch group/appdocsxml r151506 - /team/group/appdocsxml/main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 22 06:52:04 CDT 2008


Author: eliel
Date: Wed Oct 22 06:52:03 2008
New Revision: 151506

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151506
Log:
Fix a memory leak

Modified:
    team/group/appdocsxml/main/pbx.c

Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=151506&r1=151505&r2=151506
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Wed Oct 22 06:52:03 2008
@@ -3967,7 +3967,7 @@
 	ast_xml_node *tmp;
 	ast_xml_attr *valname;
 	ast_xml_text *tmptext;
-	struct ast_str *cleanstr = NULL;
+	struct ast_str *cleanstr;
 	int ret = 0, printedpara=0;
 
 	for (tmp = node->AST_XML_CHILD; tmp; tmp = tmp->AST_XML_NEXT) {
@@ -3999,8 +3999,8 @@
 				ast_xml_free_text(tmptext);
 				if (cleanstr && cleanstr->used > 0) {
 					ast_str_append(buffer, 0, ":%s", cleanstr->str);
-					ast_free(cleanstr);
 				}
+				ast_free(cleanstr);
 			}
 			ast_str_append(buffer, 0, "\n");
 		}




More information about the svn-commits mailing list