Fixed the leak of SecIdentityRef objects in a while loop.
1.1 --- a/BLIP/BLIPTest.m Tue May 05 14:46:42 2009 -0700
1.2 +++ b/BLIP/BLIPTest.m Tue May 05 15:10:15 2009 -0700
1.3 @@ -50,8 +50,10 @@
1.4 SecIdentitySearchRef search;
1.5 SecIdentitySearchCreate(kc, CSSM_KEYUSE_ANY, &search);
1.6 SecIdentityRef identity;
1.7 - while (SecIdentitySearchCopyNext(search, &identity) == noErr)
1.8 + while (SecIdentitySearchCopyNext(search, &identity) == noErr) {
1.9 [identities addObject: (id)identity];
1.10 + CFRelease( identity );
1.11 + }
1.12 CFRelease(search);
1.13 Log(@"Found %u identities -- prompting '%@'", identities.count, prompt);
1.14 if (identities.count > 0) {