CryptCreateHash: Set returned hash handle to zero in case of failure.
authorMichael Jung <mjung@iss.tu-darmstadt.de>
Wed, 27 Oct 2004 21:15:10 +0000 (21:15 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 27 Oct 2004 21:15:10 +0000 (21:15 +0000)
dlls/advapi32/crypt.c

index 833a40c1ba1b661bbda6e2ac54fdc46f0461ae51..35c1251896a572674e66a7d83ebf26ef2f4ed03a 100644 (file)
@@ -677,6 +677,7 @@ BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
 
        /* CSP error! */
        CRYPT_Free(hash);
+       *phHash = 0;
        return FALSE;
 }