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

Coverity analysis defect 103593: Unchecked return value

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • Fully Compatible
    • ALL
    • Repl 2018-06-18

      Value returned from a function is not checked for errors before being used

      Defect 103593 (STATIC_C)
      Checker CHECKED_RETURN (subcategory none)
      File: /src/mongo/db/repl/sync_tail.cpp
      Function mongo::repl::multiSyncApply(mongo::OperationContext , std::vector<const mongo::repl::OplogEntry *, std::allocator<const mongo::repl::OplogEntry *>> *, mongo::repl::SyncTail *, std::vector<mongo::MultikeyPathInfo, std::allocator<mongo::MultikeyPathInfo>>)
      /src/mongo/db/repl/sync_tail.cpp, line: 1285
      Calling "fetchAndInsertMissingDocument" without checking return value (as is done elsewhere 2 out of 3 times).

                                  st->fetchAndInsertMissingDocument(opCtx, entry);
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: