diff options
author | Willem Jan Palenstijn | 2017-09-29 18:12:59 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2017-09-29 18:15:49 +0200 |
commit | 7198dd059631c764df6018e2aa7c47e56a384135 (patch) | |
tree | 7b15ba30ea56e3dd8eceda8639ba6de54e623cf3 /gui | |
parent | 078e3b43be37218a6aa8aed0989aa49b06137a20 (diff) | |
download | scummvm-rg350-7198dd059631c764df6018e2aa7c47e56a384135.tar.gz scummvm-rg350-7198dd059631c764df6018e2aa7c47e56a384135.tar.bz2 scummvm-rg350-7198dd059631c764df6018e2aa7c47e56a384135.zip |
GUI: Fix memory leak with empty debugger input
Diffstat (limited to 'gui')
-rw-r--r-- | gui/debugger.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/debugger.cpp b/gui/debugger.cpp index b18e50b824..ce4661e9cb 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -297,8 +297,10 @@ bool Debugger::parseCommand(const char *inputOrig) { char *input = strdup(inputOrig); splitCommand(input, num_params, ¶m[0]); - if (num_params == 0) + if (num_params == 0) { + free(input); return true; + } // Handle commands first bool result; |