]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix memory leaks in XML documentation
authorMatthew Jordan <mjordan@digium.com>
Sun, 4 Nov 2012 00:47:17 +0000 (00:47 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 4 Nov 2012 00:47:17 +0000 (00:47 +0000)
commit717068e362866802de58fe96985bd62b98f7d5bc
tree4bdfad067585546117691a515c437ca21d9dbdc0
parent69777a9376bd2c03b90b3e92130d511d0974b6d0
Fix memory leaks in XML documentation

This patch fixes two memory leaks:
1) When building XML documentation items, the 'name' attribute was extracted
   from XML elements but not properly freed after being copied into the item
   being built.
2) When unloading XML documentation, the doctree container objects were not
   properly freed.

This patch corrects these memory leaks.  Note that this patch was modified
slightly for this commmit, as the case where the 'name' attribute doesn't
exist also wasn't handled in the item construction.  This patch also checks
for that attribute not existing.

(closes issue ASTERISK-20648)
Reported by: Corey Farrell
Tested by: mjordan
patches:
  xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)

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