Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1000

Memory leak in COM object xml4com when accessing "xml" property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • Utilities
    • None
    • Operating System: All
      Platform: PC
    • 23073

    Description

      Environment:Windows NT,2000 and higher, Version 2_3_0

      There is a memory leak in xml4Com object when accessing xml property.
      I narrowed it down to the function GetXML from file XMLDomUtil.cpp.
      Buffer allocated by the xmlstream.SysAllocString is never released.
      Following is suggested fix:

      void GetXML(const DOM_Node &node, _bstr_t &text)
      {
      xmlstream stream;
      stream << node;
      text = _bstr_t(stream.SysAllocString(),false);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            adenisov@goral.com Aleksandr Denisov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: