aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-01-15 20:30:48 +0000
committerTorbjörn Andersson2008-01-15 20:30:48 +0000
commit5dc2caa3070d35bd41446089d34609ee1c50e546 (patch)
treecdc6d02b87162647a0a4091682471d11f59447a4 /engines/scumm/imuse_digi/dimuse_bndmgr.cpp
parentd0e5df5bfaa583692b9114fab0964135fa24d24c (diff)
downloadscummvm-rg350-5dc2caa3070d35bd41446089d34609ee1c50e546.tar.gz
scummvm-rg350-5dc2caa3070d35bd41446089d34609ee1c50e546.tar.bz2
scummvm-rg350-5dc2caa3070d35bd41446089d34609ee1c50e546.zip
Since the mixer uses 'delete' to free memory, we should allocate it with 'new'.
I don't know if I got all cases, but I no longer get any Valgrind warnings at the beginning of CoMI when using the original sound/music files. svn-id: r30501
Diffstat (limited to 'engines/scumm/imuse_digi/dimuse_bndmgr.cpp')
-rw-r--r--engines/scumm/imuse_digi/dimuse_bndmgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index f0b4bc131b..a88faed3db 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -281,7 +281,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size,
lastBlock = _numCompItems - 1;
int32 blocksFinalSize = 0x2000 * (1 + lastBlock - firstBlock);
- *compFinal = (byte *)malloc(blocksFinalSize);
+ *compFinal = new byte[blocksFinalSize];
assert(*compFinal);
finalSize = 0;