Commit 5ef694fb authored by Felix Abecassis's avatar Felix Abecassis Committed by Rémi Denis-Courmont

DirectSound: use calloc for aout_stream_sys_t

Fix a crash occurring when CreateDSBufferPCM() fails in Start() and
afterwards Stop() uses uninitialized pointer values when releasing
objects.
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 25ff8441
......@@ -747,7 +747,7 @@ static HRESULT StreamStart( aout_stream_t *s,
audio_sample_format_t *restrict fmt,
const GUID *sid )
{
aout_stream_sys_t *sys = malloc( sizeof( *sys ) );
aout_stream_sys_t *sys = calloc( 1, sizeof( *sys ) );
if( unlikely(sys == NULL) )
return E_OUTOFMEMORY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment