wasapi: zero wasapi host api rep immediately after init. prevents (unlikely) issue with trying to free uninited allocations if com init fails during Pa_Initialize() (Ross Bencina)
This commit is contained in:
parent
17e4472219
commit
5701b05e0f
1 changed files with 2 additions and 0 deletions
|
|
@ -1066,6 +1066,8 @@ PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */
|
||||||
|
|
||||||
result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
|
result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
|
||||||
if( result != paNoError )
|
if( result != paNoError )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue