The linenoise() routine that shell/dbshell.cpp calls to collect typed input from the user uses strdup() to make a copy of its internal buffer's contents and returns the pointer from strdup(). The calling code acts as if this is just a pointer it can play with and not a block of memory that it now owns. It never calls free() on it. After ten lines of typing, ten small buffers have been leaked. The buffers are the minimum size required to hold the text (e.g. "a=7" is 4 bytes) so the shell would need to have a novella typed into it for this to even begin to matter. This is user input only, displayed data does not leak.
- Votes:
-
0 Vote for this issue
- Watchers:
-
0 Start watching this issue
- Created:
- Updated:
- Resolved: