Coverity analysis defect 101805: Non-virtual destructor

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Platforms 2017-07-31
    • None
    • None
    • None
    • None
    • None
    • None
    • None

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

      Defect 101805 (STATIC_C)
      Checker VIRTUAL_DTOR (subcategory none)
      File: /src/mongo/db/modules/enterprise/src/watchdog/watchdog.h
      Function mongo::DirectoryCheck::~DirectoryCheck()
      /src/mongo/db/modules/enterprise/src/watchdog/watchdog.h, line: 62
      Class "mongo::DirectoryCheck" has a destructor and a pointer to it is upcast to class "mongo::WatchdogCheck" which doesn't have a virtual destructor.

          class DirectoryCheck : public WatchdogCheck {
      

            Assignee:
            Mark Benvenuto
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: