[PATCH] wintrust: Remove redundant not-NULL checks (coccinellery)

Michael Stefaniuc mstefani at winehq.org
Thu Feb 21 13:35:35 CST 2019


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
return ERROR_OUTOFMEMORY if provData is NULL.


 dlls/wintrust/wintrust_main.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c
index 58e3ac39c0..7db0b4787e 100644
--- a/dlls/wintrust/wintrust_main.c
+++ b/dlls/wintrust/wintrust_main.c
@@ -309,13 +309,11 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID,
     goto done;
 
 error:
-    if (provData)
-    {
-        WINTRUST_Free(provData->padwTrustStepErrors);
-        WINTRUST_Free(provData->u.pPDSip);
-        WINTRUST_Free(provData->psPfns);
-        WINTRUST_Free(provData);
-    }
+    WINTRUST_Free(provData->padwTrustStepErrors);
+    WINTRUST_Free(provData->u.pPDSip);
+    WINTRUST_Free(provData->psPfns);
+    WINTRUST_Free(provData);
+
 done:
     TRACE("returning %08x\n", err);
     return err;
@@ -502,13 +500,11 @@ static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID,
     goto done;
 
 error:
-    if (provData)
-    {
-        WINTRUST_Free(provData->padwTrustStepErrors);
-        WINTRUST_Free(provData->u.pPDSip);
-        WINTRUST_Free(provData->psPfns);
-        WINTRUST_Free(provData);
-    }
+    WINTRUST_Free(provData->padwTrustStepErrors);
+    WINTRUST_Free(provData->u.pPDSip);
+    WINTRUST_Free(provData->psPfns);
+    WINTRUST_Free(provData);
+
 done:
     TRACE("returning %08x\n", err);
     return err;
-- 
2.20.1




More information about the wine-devel mailing list