diff options
author | Eugene Sandulenko | 2013-12-10 22:27:31 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-10 22:27:31 +0200 |
commit | 3207c011cbbf09bde16907a34f7e27b3218b36e8 (patch) | |
tree | ac37fe0096c7d62a4773e8e8e71e4c49016e9aa6 /engines/fullpipe | |
parent | 6e6685a53de4f0f3deb4414f59153b2d6f673b6b (diff) | |
download | scummvm-rg350-3207c011cbbf09bde16907a34f7e27b3218b36e8.tar.gz scummvm-rg350-3207c011cbbf09bde16907a34f7e27b3218b36e8.tar.bz2 scummvm-rg350-3207c011cbbf09bde16907a34f7e27b3218b36e8.zip |
FULLPIPE: Plug memory leak
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/messages.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index c28365acc5..32cfb4f2bd 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -576,13 +576,12 @@ int GlobalMessageQueueList::compact() { uint i; for (i = 1; i < size() + 2; i++) { - if (!useList[i]) { - delete [] useList; - - return i; - } + if (!useList[i]) + break; } + delete [] useList; + return i; } |