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

Coverity analysis defect 72713: Resource leak

    • Fully Compatible
    • ALL

      Leak of memory or pointers to system resources

      Defect 72713 (STATIC_C)
      Checker RESOURCE_LEAK (subcategory none)
      File: /src/mongo/db/commands/user_management_commands.cpp
      Function mongo::<unnamed>::getCurrentUserRoles(mongo::OperationContext *, mongo::AuthorizationManager *, const mongo::UserName &, std::unordered_set<mongo::RoleName, std::hash<mongo::RoleName>, std::equal_to<mongo::RoleName>, std::allocator<mongo::RoleName>> *)
      /src/mongo/db/commands/user_management_commands.cpp, line: 151
      Variable "user" going out of scope leaks the storage it points to.

                  return Status::OK();
      

            Assignee:
            daniel.alabi@10gen.com Daniel Alabi
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: