diff options
author | Johannes Schickel | 2010-08-02 22:35:29 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-08-02 22:35:29 +0000 |
commit | 92b0b384eaea0540bf7c06652d799b616ebf4c3c (patch) | |
tree | 3ffa6e58fdb98a5ca239a51b203be0e68ac56044 /engines | |
parent | 4e33b7a3befbc4d14cdb57ac8da8c205ca724cb0 (diff) | |
download | scummvm-rg350-92b0b384eaea0540bf7c06652d799b616ebf4c3c.tar.gz scummvm-rg350-92b0b384eaea0540bf7c06652d799b616ebf4c3c.tar.bz2 scummvm-rg350-92b0b384eaea0540bf7c06652d799b616ebf4c3c.zip |
SCI: Fix memory leak.
svn-id: r51669
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/message.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index cdecc556e8..6e1b326c4f 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -166,6 +166,8 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re } if (!reader->init()) { + delete reader; + warning("Message: failed to read resource header"); return false; } @@ -180,6 +182,7 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re continue; } + delete reader; return false; } @@ -193,6 +196,7 @@ bool MessageState::getRecord(CursorStack &stack, bool recurse, MessageRecord &re } } + delete reader; return true; } } |