summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2020-08-12 15:02:29 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-19 15:17:40 +0000
commitd8c7c2c514fb8a44b7b2a731105582b66ed7b253 (patch)
tree3002b0e004f8b6a95956395fa4a769c3edc1c89f
parentafeaf1aa3b84953c2582c10bde12c92107040d47 (diff)
downloadmongo-d8c7c2c514fb8a44b7b2a731105582b66ed7b253.tar.gz
SERVER-50180 Fix User lifetime management in AuthorizationManager::acquireUserForSessionRefreshr3.6.20-rc0
(cherry picked from commit 0a1b7e768ca29e2cb232c1af70beb55485fc96cb)
-rw-r--r--src/mongo/db/auth/authorization_manager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp
index 584f4fef33c..baf3a7a99e3 100644
--- a/src/mongo/db/auth/authorization_manager.cpp
+++ b/src/mongo/db/auth/authorization_manager.cpp
@@ -595,6 +595,7 @@ Status AuthorizationManager::acquireUserForSessionRefresh(OperationContext* opCt
}
if (uid != (*user)->getID()) {
+ releaseUser(*user);
*user = nullptr;
return {ErrorCodes::UserNotFound,
str::stream() << "User id from privilege document '" << userName.toString()