Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-707

Incorrect use of delete in AxisEngineException::processException()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • current (nightly)
    • None
    • Server - Engine
    • None
    • Windows XP Pro, VS2003

    Description

      There is a delete statement in AxisEngineException::processException() which
      has a couple of problems:
      First, if you were supposed to delete the pointer passed in, delete[] should
      be used (in C++). But, at least in the case of the exception thrown when a
      library fails to load, a constant character pointer is passed in (in this
      case "") – see this line in XMLParserFactory::loadLib():
      throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED,
      PLATFORM_LOADLIB_ERROR);

      Why not just use a const std::string& instead of char*?

      Attachments

        Issue Links

          Activity

            People

              dchandradasa Marcus Dushshantha Chandradasa
              hnordberg Henrik Nordberg
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: