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

DOMElement::setIdAttribute*() memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • DOM
    • None
    • Operating System: All
      Platform: All
    • 26607

    Description

      DOMElement::setIdAttribute*() leaks when repeatedly called for an attribute that
      is already set as an ID.

      More specifically, DOMAttrImpl::addAttrToIDNodeMap() adds the attribute to the
      DOMNodeIDMap whether or not it is already there.

      The fix is:
      File: src/xercesc/dom/impl/DOMAttrImpl.hpp
      Function: inline void DOMAttrImpl::addAttrToIDNodeMap()
      Insert at the start of the function:
      if (fNode.isIdAttr())
      return;

      – merlin

      Attachments

        Activity

          People

            Unassigned Unassigned
            apache@merlin.org merlin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: