aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-04-28 23:25:33 +0300
committerEugene Sandulenko2013-04-28 23:59:20 +0300
commita10ad272a841a216e86148f566812d0177de8631 (patch)
treeaed6c02ea5de9214e567122cf81c44640764477b /engines
parent0f9f2683142b0f6a371492e6cf6da8c6c3a51093 (diff)
downloadscummvm-rg350-a10ad272a841a216e86148f566812d0177de8631.tar.gz
scummvm-rg350-a10ad272a841a216e86148f566812d0177de8631.tar.bz2
scummvm-rg350-a10ad272a841a216e86148f566812d0177de8631.zip
SCUMM HE: Plug memory leak. CID 1003582
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/wiz_he.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 798f703db6..e364105e5a 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1548,12 +1548,16 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int
if (rScreen.intersects(clip)) {
rScreen.clip(clip);
} else {
+ free(dst);
+
return 0;
}
} else if (_rectOverrideEnabled) {
if (rScreen.intersects(_rectOverride)) {
rScreen.clip(_rectOverride);
} else {
+ free(dst);
+
return 0;
}
}