aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorDavid Turner2011-01-30 23:21:40 +0000
committerDavid Turner2011-01-30 23:21:40 +0000
commit9573b1d2f54818f9bdac4a91e0a90b306ade7810 (patch)
tree1396343102d7066f824f250a0565973e79bcf8e0 /engines/tinsel
parent785f1776c4e88f5f48ad91d20fdf45874b74f5ad (diff)
downloadscummvm-rg350-9573b1d2f54818f9bdac4a91e0a90b306ade7810.tar.gz
scummvm-rg350-9573b1d2f54818f9bdac4a91e0a90b306ade7810.tar.bz2
scummvm-rg350-9573b1d2f54818f9bdac4a91e0a90b306ade7810.zip
TINSEL: Memory Leak Fix in Coroutines.
This fixes the leak from the COR0_BEGIN_CODE macro's CoroContextTag allocation. Setting the _sleep value to negative values prevented the deallocation of these. Have tested for obvious regressions, but a full DW/DW2 playtest should be done to confirm that this doesn't cause any issues. Thanks to fingolfin for indicating this solution. svn-id: r55671
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/coroutine.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h
index 82bc2c4cca..b14030c708 100644
--- a/engines/tinsel/coroutine.h
+++ b/engines/tinsel/coroutine.h
@@ -184,7 +184,7 @@ public:
* Stop the currently running coroutine.
*/
#define CORO_KILL_SELF() \
- do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while (0)
+ do { if (&coroParam != &nullContext) { coroParam->_sleep = 0; } return; } while (0)
/**