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

Coverity analysis defect 115639: Dereference after null check

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • Storage
    • Fully Compatible
    • ALL
    • Execution Team 2020-11-30

    Description

      Dereference after null check

      Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
      /src/mongo/db/modules/enterprise/src/hot_backups/backup_cursor_service.cpp:82: FORWARD_NULL 115639 Comparing "replCoord" to null implies that "replCoord" might be null.
      /src/mongo/db/modules/enterprise/src/hot_backups/backup_cursor_service.cpp:115: FORWARD_NULL 115639 Passing null pointer "replCoord" to "getTerm", which dereferences it. (The dereference happens because this is a virtual function call.)

      Attachments

        Activity

          People

            gregory.noma@mongodb.com Gregory Noma
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: