From 86700a70d32e40c806edbb1121dfa1f76c9f2b2a Mon Sep 17 00:00:00 2001 From: "stuart.morgan%alumni.case.edu" Date: Mon, 4 Jun 2007 17:24:23 +0000 Subject: [PATCH] Camino only - Bug 382801: Ensure that the keychain cache key lasts as long as it is used. r/sr=josh git-svn-id: svn://10.0.0.236/trunk@227476 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/formfill/KeychainService.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/camino/src/formfill/KeychainService.mm b/mozilla/camino/src/formfill/KeychainService.mm index 0df1148d9be..8304367d7f8 100644 --- a/mozilla/camino/src/formfill/KeychainService.mm +++ b/mozilla/camino/src/formfill/KeychainService.mm @@ -566,7 +566,9 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused) } - (void)expirationTimerFired:(NSTimer*)theTimer { - [self cacheKeychainEntry:nil forKey:[theTimer userInfo]]; + // Ensure that the key will survive past the timer invalidation + NSString* key = [[[theTimer userInfo] retain] autorelease]; + [self cacheKeychainEntry:nil forKey:key]; } @end