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
|
|
@ -1065,6 +1065,8 @@ PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiInd
|
|||
result = paInsufficientMemory;
|
||||
goto error;
|
||||
}
|
||||
|
||||
memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */
|
||||
|
||||
result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
|
||||
if( result != paNoError )
|
||||
|
|
|
|||
Loading…
Reference in a new issue