diff options
author | Eugene Sandulenko | 2014-06-10 19:32:16 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-06-10 19:32:47 +0300 |
commit | 8ca3316e3a19b875327fcf97c854445ec9b925d2 (patch) | |
tree | 923def2adb34c1ed8ec4a3f2e096292a6f1a2843 | |
parent | 51184eab9d24567fed0e3064aa445be0bf21a9d8 (diff) | |
download | scummvm-rg350-8ca3316e3a19b875327fcf97c854445ec9b925d2.tar.gz scummvm-rg350-8ca3316e3a19b875327fcf97c854445ec9b925d2.tar.bz2 scummvm-rg350-8ca3316e3a19b875327fcf97c854445ec9b925d2.zip |
FULLPIPE: Plug potential resource leak. CID 1208906
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 0a69335bea..fd1ececdf2 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -633,6 +633,7 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) { mq1->addExCommandToEnd(mq2->getExCommandByIndex(0)->createClone()); delete mq2; + mq2 = 0; ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 2; @@ -662,6 +663,9 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) { mq1->addExCommandToEnd(ex); } + if (mq2) + delete mq2; + return mq1; } |