Fix possible NULL deref

when allocation of drybuf fails
This commit is contained in:
derselbst 2021-01-29 14:07:01 +01:00
parent 4d76a6ad85
commit dc3d7b8ffa
2 changed files with 2 additions and 2 deletions

View file

@ -519,7 +519,7 @@ void delete_fluid_dsound_audio_driver(fluid_audio_driver_t *d)
IDirectSound_Release(dev->direct_sound);
}
if(dev->func)
if(dev->drybuf != NULL)
{
for(i = 0; i < dev->channels_count; ++i)
{

View file

@ -561,7 +561,7 @@ void delete_fluid_waveout_audio_driver(fluid_audio_driver_t *d)
CloseHandle(dev->hQuit);
}
if(dev->func)
if(dev->drybuf != NULL)
{
for(i = 0; i < dev->channels_count; ++i)
{