Commit e3ee789b authored by davidben@chromium.org's avatar davidben@chromium.org

Consistently increase the reference count when calling GetDefaultNSSKeySlot

We're actually freeing the key slot multiple times on Chrome OS. Also
documented the requirement to PK11_FreeSlot in the function declaration. We
probably want to add some sort of scoped_refptr-like thing, but for now this
function is only used in one place anyway.

R=cmasone
BUG=47587
TEST=none

Review URL: http://codereview.chromium.org/2873027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51091 0039d316-1c4b-4281-b951-d872f2087c98
parent 6f55300b
......@@ -227,7 +227,7 @@ class NSSInitSingleton {
PK11SlotInfo* GetDefaultKeySlot() {
if (real_db_slot_)
return real_db_slot_;
return PK11_ReferenceSlot(real_db_slot_);
return PK11_GetInternalKeySlot();
}
......
......@@ -12,6 +12,8 @@
namespace base {
// Returns a reference to the default NSS key slot. Caller must release
// reference with PK11_FreeSlot.
PK11SlotInfo* GetDefaultNSSKeySlot();
} // namespace base
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment