Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
Fully Compatible
-
ALL
-
Dev Tools 2019-11-04
Description
Leak of memory or pointers to system resources
Defect 10181 (STATIC_C)
Checker RESOURCE_LEAK (subcategory none)
File: /src/mongo/shell/linenoise.cpp
Function InputBuffer::incrementalHistorySearch(PromptBase &, int)
/src/mongo/shell/linenoise.cpp, line: 1935
Storage is returned from allocation function "operator new[]".
activeHistoryLine = new UChar32[bufferSize];
|
/src/mongo/shell/linenoise.cpp, line: 1935
Assigning: "activeHistoryLine" = storage returned from "new linenoise_utf8::UChar32[bufferSize]".
activeHistoryLine = new UChar32[bufferSize];
|
/src/mongo/shell/linenoise.cpp, line: 1883
Overwriting "activeHistoryLine" in "activeHistoryLine = new linenoise_utf8::UChar32[bufferSize]" leaks the storage that "activeHistoryLine" points to.
activeHistoryLine = new UChar32[bufferSize];
|