summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 19:22:05 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 19:22:05 +0000
commit3d9d4558ac5f0e5f34269f37c5e5536bf221eb87 (patch)
tree79cb9080d935932beaaedbcc426981a5e16c3d74 /chrome/browser
parent536458341697a27837a50d7eab7eb925b61a24ad (diff)
downloadchromium_src-3d9d4558ac5f0e5f34269f37c5e5536bf221eb87.zip
chromium_src-3d9d4558ac5f0e5f34269f37c5e5536bf221eb87.tar.gz
chromium_src-3d9d4558ac5f0e5f34269f37c5e5536bf221eb87.tar.bz2
Coverity: Check the return value of CryptDestroyHash and CryptReleaseContext.
CID=6309 BUG=none TEST=none Review URL: http://codereview.chromium.org/243103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/password_manager/ie7_password.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/password_manager/ie7_password.cc b/chrome/browser/password_manager/ie7_password.cc
index a720802..46052f7 100644
--- a/chrome/browser/password_manager/ie7_password.cc
+++ b/chrome/browser/password_manager/ie7_password.cc
@@ -50,10 +50,16 @@ struct PasswordEntry {
// Cleans up a crypt prov and a crypt hash.
void CleanupHashContext(HCRYPTPROV prov, HCRYPTHASH hash) {
- if (hash)
- CryptDestroyHash(hash);
- if (prov)
- CryptReleaseContext(prov, 0);
+ BOOL ok;
+ if (hash) {
+ ok = CryptDestroyHash(hash);
+ DCHECK(ok);
+ }
+
+ if (prov) {
+ ok = CryptReleaseContext(prov, 0);
+ DCHECK(ok);
+ }
}
} // namespace