crypt32: Only destroy a decoded message's hash if it's been created.

This commit is contained in:
Juan Lang 2007-07-27 10:58:52 -07:00 committed by Alexandre Julliard
parent d76e1899ad
commit 6f2ae25441
1 changed files with 2 additions and 1 deletions

View File

@ -1255,7 +1255,8 @@ static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg)
switch (msg->type)
{
case CMSG_HASHED:
CryptDestroyHash(msg->u.hash);
if (msg->u.hash)
CryptDestroyHash(msg->u.hash);
break;
case CMSG_SIGNED:
LocalFree(msg->u.signedInfo);