James Hawkins : advapi32: Remove redundant NULL checks before
CRYPT_Free.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 30 06:45:05 CST 2006
Module: wine
Branch: master
Commit: 024237efaaaa689d077b299016e0dedea541b722
URL: http://source.winehq.org/git/wine.git/?a=commit;h=024237efaaaa689d077b299016e0dedea541b722
Author: James Hawkins <truiken at gmail.com>
Date: Wed Nov 29 20:50:58 2006 -0800
advapi32: Remove redundant NULL checks before CRYPT_Free.
---
dlls/advapi32/crypt.c | 31 +++++++++++--------------------
1 files changed, 11 insertions(+), 20 deletions(-)
diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c
index 8dd3486..07c767a 100644
--- a/dlls/advapi32/crypt.c
+++ b/dlls/advapi32/crypt.c
@@ -474,22 +474,15 @@ error:
pProv->dwMagic = 0;
if (pProv->hModule)
FreeLibrary(pProv->hModule);
- if (pProv->pVTable)
- CRYPT_Free(pProv->pVTable);
- if (pProv->pFuncs)
- CRYPT_Free(pProv->pFuncs);
+ CRYPT_Free(pProv->pVTable);
+ CRYPT_Free(pProv->pFuncs);
CRYPT_Free(pProv);
}
- if (pszContainerA)
- CRYPT_Free(pszContainerA);
- if (provnameA)
- CRYPT_Free(provnameA);
- if (provname)
- CRYPT_Free(provname);
- if (temp)
- CRYPT_Free(temp);
- if (imagepath)
- CRYPT_Free(imagepath);
+ CRYPT_Free(pszContainerA);
+ CRYPT_Free(provnameA);
+ CRYPT_Free(provname);
+ CRYPT_Free(temp);
+ CRYPT_Free(imagepath);
return FALSE;
}
@@ -517,10 +510,8 @@ BOOL WINAPI CryptAcquireContextA (HCRYPT
ret = CryptAcquireContextW(phProv, pContainer, pProvider, dwProvType, dwFlags);
- if (pContainer)
- CRYPT_Free(pContainer);
- if (pProvider)
- CRYPT_Free(pProvider);
+ CRYPT_Free(pContainer);
+ CRYPT_Free(pProvider);
return ret;
}
@@ -1663,7 +1654,7 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH h
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
result = CryptSignHashW(hHash, dwKeySpec, wsDescription, dwFlags, pbSignature, pdwSigLen);
- if (wsDescription) CRYPT_Free(wsDescription);
+ CRYPT_Free(wsDescription);
return result;
}
@@ -1962,7 +1953,7 @@ BOOL WINAPI CryptVerifySignatureA (HCRYP
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
result = CryptVerifySignatureW(hHash, pbSignature, dwSigLen, hPubKey, wsDescription, dwFlags);
- if (wsDescription) CRYPT_Free(wsDescription);
+ CRYPT_Free(wsDescription);
return result;
}
More information about the wine-cvs
mailing list