crypt32(8/9): Only destroy a decoded message's hash if it's been created

Juan Lang juan.lang at gmail.com
Fri Jul 27 13:03:02 CDT 2007


--Juan
-------------- next part --------------
From 541854b100bbabeac4804367fe0a1e4c628a68e4 Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Fri, 27 Jul 2007 10:58:52 -0700
Subject: [PATCH] Only destroy a decoded message's hash if it's been created
---
 dlls/crypt32/msg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index bca4040..f554c78 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -1255,7 +1255,8 @@ static void CDecodeMsg_Close(HCRYPTMSG h
     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);
-- 
1.4.1


More information about the wine-patches mailing list