Marcus Meissner : cryptnet: Avoid memory leak of info (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Oct 15 14:29:05 CDT 2012


Module: wine
Branch: master
Commit: 919a789f454f1bd30c9edc3992cc2982a4935a22
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=919a789f454f1bd30c9edc3992cc2982a4935a22

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sat Oct 13 17:23:27 2012 +0200

cryptnet: Avoid memory leak of info (Coverity).

---

 dlls/cryptnet/cryptnet_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c
index 652c812..c7511d7 100644
--- a/dlls/cryptnet/cryptnet_main.c
+++ b/dlls/cryptnet/cryptnet_main.c
@@ -757,7 +757,6 @@ static void CRYPT_CacheURL(LPCWSTR pszURL, const CRYPT_BLOB_ARRAY *pObject,
             if (CompareFileTime(&info->ExpireTime, &ft) < 0)
             {
                 DeleteUrlCacheEntryW(pszURL);
-                CryptMemFree(info);
             }
             else
             {
@@ -767,6 +766,7 @@ static void CRYPT_CacheURL(LPCWSTR pszURL, const CRYPT_BLOB_ARRAY *pObject,
                 return;
             }
         }
+        CryptMemFree(info);
     }
 
     if (!CreateUrlCacheEntryW(pszURL, pObject->rgBlob[0].cbData, NULL, cacheFileName, 0))




More information about the wine-cvs mailing list