crypt32: Don't crash if adding to a provider store fails.

This commit is contained in:
Juan Lang 2008-10-20 14:02:39 -07:00 committed by Alexandre Julliard
parent 30de39b2a7
commit 9686e7b286
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
/* dirty trick: replace the returned context's hCertStore with
* store.
*/
if (ppStoreContext)
if (ret && ppStoreContext)
(*(PCERT_CONTEXT *)ppStoreContext)->hCertStore = store;
return ret;
}
@ -145,7 +145,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
/* dirty trick: replace the returned context's hCertStore with
* store.
*/
if (ppStoreContext)
if (ret && ppStoreContext)
(*(PCRL_CONTEXT *)ppStoreContext)->hCertStore = store;
return ret;
}
@ -212,7 +212,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
/* dirty trick: replace the returned context's hCertStore with
* store.
*/
if (ppStoreContext)
if (ret && ppStoreContext)
(*(PCTL_CONTEXT *)ppStoreContext)->hCertStore = store;
return ret;
}