mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-24 10:45:46 +00:00
DIRECTOR: Fix memory leaks
This commit is contained in:
parent
0c940567dd
commit
edb2edf3f4
@ -399,6 +399,8 @@ void Lingo::func_cursor(int c, int m) {
|
||||
warning("STUB: func_cursor(): Hotspot is the registration point of the cast member");
|
||||
_vm->getMacWindowManager()->pushCustomCursor(assembly, 16, 16, 1, 1, 3);
|
||||
|
||||
free(assembly);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -88,13 +88,14 @@ void DirectorSound::playFile(Common::String filename, uint8 soundChannel) {
|
||||
}
|
||||
|
||||
void DirectorSound::playWAV(Common::String filename, uint8 soundChannel) {
|
||||
Common::File *file = new Common::File();
|
||||
|
||||
if (soundChannel == 0 || soundChannel > _channels.size()) {
|
||||
warning("Invalid sound channel %d", soundChannel);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Common::File *file = new Common::File();
|
||||
|
||||
if (!file->open(filename)) {
|
||||
warning("Failed to open %s", filename.c_str());
|
||||
|
||||
@ -110,13 +111,13 @@ void DirectorSound::playWAV(Common::String filename, uint8 soundChannel) {
|
||||
}
|
||||
|
||||
void DirectorSound::playAIFF(Common::String filename, uint8 soundChannel) {
|
||||
Common::File *file = new Common::File();
|
||||
|
||||
if (soundChannel == 0 || soundChannel > _channels.size()) {
|
||||
warning("Invalid sound channel %d", soundChannel);
|
||||
return;
|
||||
}
|
||||
|
||||
Common::File *file = new Common::File();
|
||||
|
||||
if (!file->open(filename)) {
|
||||
warning("Failed to open %s", filename.c_str());
|
||||
delete file;
|
||||
|
Loading…
Reference in New Issue
Block a user