[Scummvm-git-logs] scummvm master -> 34edc7e09651303c49c934c599fc0e9b20510fa0

bluegr noreply at scummvm.org
Wed Jun 21 07:01:51 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
34edc7e096 HDB: Fix double-free on voice playback


Commit: 34edc7e09651303c49c934c599fc0e9b20510fa0
    https://github.com/scummvm/scummvm/commit/34edc7e09651303c49c934c599fc0e9b20510fa0
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-06-21T10:01:47+03:00

Commit Message:
HDB: Fix double-free on voice playback

Sound::playVoice():
Do not delete source stream on failed MP3/Vorbis decoding.
This is already handled by the created Audio::MP3Stream/VorbisStream.

Changed paths:
    engines/hdb/sound.cpp


diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index 61b95756937..80087a4b26f 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -1634,7 +1634,6 @@ void Sound::playVoice(int index, int actor) {
 #ifdef USE_VORBIS
 		Audio::AudioStream *audioStream = Audio::makeVorbisStream(stream, DisposeAfterUse::YES);
 		if (audioStream == nullptr) {
-			delete stream;
 			return;
 		}
 
@@ -1654,7 +1653,6 @@ void Sound::playVoice(int index, int actor) {
 #ifdef USE_MAD
 		Audio::AudioStream *audioStream = Audio::makeMP3Stream(stream, DisposeAfterUse::YES);
 		if (audioStream == nullptr) {
-			delete stream;
 			return;
 		}
 




More information about the Scummvm-git-logs mailing list