]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix memory leak in XML documentation
authorMatthew Jordan <mjordan@digium.com>
Fri, 17 Aug 2012 20:21:30 +0000 (20:21 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 17 Aug 2012 20:21:30 +0000 (20:21 +0000)
commitb11ffd0514bf86088a2eca562ddfb029ab2a27b7
tree3a42417098dfe47431795760ff90651f5bd3e80a
parent58c2a811faf2d1532c5298c91401d94c15eab04d
Fix memory leak in XML documentation

When formatting documentation fields, the XML documentation parser calls
xmldoc_get_formatted.  This function allocates a string buffer at the
beginning of its routine.  Unfortunately, on certain code paths, it also
calls xmldoc_string_cleanup, which assumes that it will create the string
buffer.  The previously allocated string buffer is then leaked by the
xmldoc_string_cleanup routine.

Now: we don't do that.

(closes issue AST-932)
Reported by: Alexander Homig
........

Merged revisions 371469 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@371491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/xmldoc.c