wintrust: Don't dereference a potentially NULL pointer.

This commit is contained in:
Juan Lang 2011-12-11 08:36:55 -08:00 committed by Alexandre Julliard
parent e6a4a86608
commit ba78b54820
1 changed files with 2 additions and 1 deletions

View File

@ -1207,7 +1207,8 @@ HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *data)
CryptMsgClose(data->hMsg);
if (data->fOpenedFile &&
data->pWintrustData->dwUnionChoice == WTD_CHOICE_FILE)
data->pWintrustData->dwUnionChoice == WTD_CHOICE_FILE &&
data->pWintrustData->u.pFile)
CloseHandle(data->pWintrustData->u.pFile->hFile);
return S_OK;