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

Coverity analysis defect 122495: Resource leak in object

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Service Arch 2022-07-11

      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.

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

              Created:
              Updated:
              Resolved: