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

Coverity analysis defect 73595: Unchecked return value

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL

    Description

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

      Defect 73595 (STATIC_C)
      Checker CHECKED_RETURN (subcategory none)
      File: /src/mongo/s/client/sharding_connection_hook.cpp
      Function mongo::ShardingConnectionHook::onCreate(mongo::DBClientBase *)
      /src/mongo/s/client/sharding_connection_hook.cpp, line: 98
      Calling "runCommand" without checking return value (as is done elsewhere 62 out of 93 times).

                  conn->runCommand("admin", BSON("ismaster" << 1), isMasterResponse);

      Attachments

        Activity

          People

            spencer@mongodb.com Spencer Brody (Inactive)
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: