aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-09-29 18:12:59 +0200
committerWillem Jan Palenstijn2017-09-29 18:15:49 +0200
commit7198dd059631c764df6018e2aa7c47e56a384135 (patch)
tree7b15ba30ea56e3dd8eceda8639ba6de54e623cf3 /gui
parent078e3b43be37218a6aa8aed0989aa49b06137a20 (diff)
downloadscummvm-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.cpp4
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, &param[0]);
- if (num_params == 0)
+ if (num_params == 0) {
+ free(input);
return true;
+ }
// Handle commands first
bool result;