wintrust(5/8): Use pfnAddStore2Chain internally

Juan Lang juan.lang at gmail.com
Tue Aug 28 18:21:56 CDT 2007


--Juan
-------------- next part --------------
From 348ff3c5272fa49b4f3a3f197205c0b573fbeb2c Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Tue, 28 Aug 2007 16:09:34 -0700
Subject: [PATCH] Use pfnAddStore2Chain internally
---
 dlls/wintrust/softpub.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 4c8d356..4b6b33a 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -168,16 +168,8 @@ static BOOL SOFTPUB_CreateStoreFromMessa
      data->hProv, CERT_STORE_NO_CRYPT_RELEASE_FLAG, data->hMsg);
     if (store)
     {
-        data->pahStores = data->psPfns->pfnAlloc(sizeof(HCERTSTORE));
-        if (data->pahStores)
-        {
-            data->chStores = 1;
-            data->pahStores[0] = CertDuplicateStore(store);
-            CertCloseStore(store, 0);
-            ret = TRUE;
-        }
-        else
-            SetLastError(ERROR_OUTOFMEMORY);
+        ret = data->psPfns->pfnAddStore2Chain(data, store);
+        CertCloseStore(store, 0);
     }
     TRACE("returning %d\n", ret);
     return ret;
-- 
1.4.1


More information about the wine-patches mailing list