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

Coverity analysis defect 15610: Resource leak candidateExplain

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      A new defect has been detected and assigned to hari.khalsa@10gen.com in Coverity Connect http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=15610
      The defect was flagged by checker RESOURCE_LEAK in
      file /src/mongo/db/query/multi_plan_runner.cpp
      function mongo::MultiPlanRunner::getExplainPlan(mongo::TypeExplain **) const
      and this ticket was created by matt.kangas@10gen.com

      https://github.com/mongodb/mongo/blame/master/src/mongo/db/query/multi_plan_runner.cpp#L472-L477

                  TypeExplain* candidateExplain;
                  status = explainPlan(**it, &candidateExplain, false /* no full details */);
                  if (status != Status::OK()) {
                      continue;
                  }

      12. alloc_arg: "mongo::explainPlan(mongo::PlanStageStats const &, mongo::TypeExplain **, bool)" allocates memory that is stored into "candidateExplain".
      CID 15610 (#1 of 1): Resource leak (RESOURCE_LEAK)15. leaked_storage: Variable "candidateExplain" going out of scope leaks the storage it points to.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: