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

Coverity analysis defect 72910: Dereference after null check

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • Fully Compatible
    • ALL
    • Integration 10 (02/22/16)

    Description

      Pointer is checked against null but then dereferenced anyway

      Defect 72910 (STATIC_C)
      Checker FORWARD_NULL (subcategory none)
      File: /src/mongo/db/cloner.cpp
      Function mongo::Cloner::Fun::operator ()(mongo::DBClientCursorBatchIterator &)
      /src/mongo/db/cloner.cpp, line: 138
      Comparing "collection" to null implies that "collection" might be null.

                  if (!collection) {

      Attachments

        Activity

          People

            kyle.suarez@mongodb.com Kyle Suarez
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: