- The paramname is a pointer allocated with strdup() or malloc(), so,
authorEliel C. Sardanons <eliels@gmail.com>
Wed, 12 Nov 2008 17:28:02 +0000 (17:28 +0000)
committerEliel C. Sardanons <eliels@gmail.com>
Wed, 12 Nov 2008 17:28:02 +0000 (17:28 +0000)
we need to free it with ast_free().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@156162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/xmldoc.c

index 3a68b6c..4855d2c 100644 (file)
@@ -866,8 +866,8 @@ static char *xmldoc_get_syntax_cmd(struct ast_xml_node *fixnode, const char *nam
 {
        struct ast_str *syntax;
        struct ast_xml_node *tmpnode, *node = fixnode;
-       char *ret;
-       const char *paramname, *paramtype, *attrname, *literal;
+       char *ret, *paramname;
+       const char *paramtype, *attrname, *literal;
        int required, isenum, first = 1, isliteral;
 
        syntax = ast_str_create(128);
@@ -941,7 +941,7 @@ static char *xmldoc_get_syntax_cmd(struct ast_xml_node *fixnode, const char *nam
                                (isenum || isliteral ? "" : ">"),
                                (required ? "" : "]"));
                first = 0;
-               ast_xml_free_attr(paramname);
+               ast_free(paramname);
        }
 
        /* return a common string. */