Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67764

Coverity analysis defect 122495: Resource leak in object

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2022-07-11

    Description

      Resource leak in object

      The memory will not be reclaimed by the destructor, and it cannot be reused until the process terminates. Constructor allocates memory but destructor does not free it
      /src/mongo/db/commands/server_status_metric.cpp:56: CTOR_DTOR_LEAK 122495 Allocating memory by calling "new std::mutex".
      /src/mongo/db/commands/server_status_metric.cpp:56: CTOR_DTOR_LEAK 122495 Assigning: "this->mutex" = "new std::mutex".
      /src/mongo/db/commands/server_status_metric.cpp:56: CTOR_DTOR_LEAK 122495 The constructor allocates field "mutex" of "mongo::globalMetricTree(bool)::[unnamed type of 'instance']" but there is no destructor.

      Attachments

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: