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

Coverity analysis defect 101500: Non-virtual destructor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.7
    • Affects Version/s: None
    • Component/s: Querying
    • Fully Compatible
    • ALL
    • Query 2017-05-08

      The correct derived class destructor is not invoked due to the absence of a virtual destructor in the base class

      Defect 101500 (STATIC_C)
      Checker VIRTUAL_DTOR (subcategory none)
      File: /src/mongo/db/update/update_object_node.h
      Function mongo::UpdateObjectNode::~UpdateObjectNode()
      /src/mongo/db/update/update_object_node.h, line: 41
      Class "mongo::UpdateObjectNode" has a destructor and a pointer to it is upcast to class "mongo::UpdateNode" which doesn't have a virtual destructor.

          class UpdateObjectNode : public UpdateNode {
      

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: