adium 5506:131c5ecd1169: Fix yet another bug with trustRef here:...

commits at adium.im commits at adium.im
Tue May 21 21:54:00 UTC 2013


details:	http://hg.adium.im/adium/rev/131c5ecd1169
revision:	5506:131c5ecd1169
branch:		adium-1.6
author:		Thijs Alkemade <me at thijsalkema.de>
date:		Tue May 21 23:53:01 2013 +0200

Fix yet another bug with trustRef here: overreleased when an error occurred in SecTrustCreateWithCertificates().

diffs (21 lines):

diff -r a243fe8581d8 -r 131c5ecd1169 Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m
--- a/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m	Sun May 19 22:57:19 2013 +0200
+++ b/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m	Tue May 21 23:53:01 2013 +0200
@@ -97,7 +97,7 @@
 
 - (void)dealloc {
 	CFRelease(certificates);
-	CFRelease(trustRef);
+	if (trustRef) CFRelease(trustRef);
 	
 	[hostname release];
 	
@@ -166,8 +166,6 @@
 	if(err != noErr) {
 		CFRelease(searchRef);
 		CFRelease(policyRef);
-		if (trustRef)
-			CFRelease(trustRef);
 		NSBeep();
 		[self release];
 		return;




More information about the commits mailing list