Fix memory leak in XML documentation
authorMatthew Jordan <mjordan@digium.com>
Fri, 17 Aug 2012 20:52:43 +0000 (20:52 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 17 Aug 2012 20:52:43 +0000 (20:52 +0000)
commiteedab0744b622dfa902b57f83a4a20670c3ce437
treed0b5cfbe216b0b55a004c241927cd53fb0d27712
parent1a95c9a906e9548a04d91fe77d77216a93e30df9
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
........

Merged revisions 371491 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 371492 from http://svn.asterisk.org/svn/asterisk/branches/11

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