Coverity analysis defect 73597: Unsafe assignment operator

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Assignment operator does not check for self-assignment

      Defect 73597 (STATIC_C)
      Checker SELF_ASSIGN (subcategory none)
      File: /src/mongo/s/catalog/forwarding_catalog_manager.cpp
      Function mongo::ForwardingCatalogManager::ScopedDistLock::operator =(mongo::ForwardingCatalogManager::ScopedDistLock&&)
      /src/mongo/s/catalog/forwarding_catalog_manager.cpp, line: 423
      No protection against the object assigning to itself.

              _fcm = other._fcm;
      

            Assignee:
            Andy Schwerin
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: