From 4393d38a311df69f473febc5c2fdf135694609e9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 4 Jan 2015 19:18:41 +0100 Subject: FULLPIPE: Plug memory leak --- engines/fullpipe/statics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 880c2eb0df..6b35159fd1 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1048,8 +1048,11 @@ MessageQueue *StaticANIObject::changeStatics1(int msgNum) { if (_flags & 1) _messageQueueId = mq->_id; } else { - if (!queueMessageQueue(mq)) + if (!queueMessageQueue(mq)) { + delete mq; + return 0; + } g_fp->_globalMessageQueueList->addMessageQueue(mq); } -- cgit v1.2.3