From da87ee2564f73d7f578ffb08e5d03073ce49d694 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 13 Mar 2010 20:41:36 +0000 Subject: - Fix some leaks and autoreleases after checking static analysis --- Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Frameworks') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 2f2a8858..19624652 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -229,6 +229,7 @@ static BOOL sTruncateLongFieldInLogs = YES; [delegateDecisionLock lock]; lastDelegateDecisionForLostConnection = [delegate connectionLost:self]; [delegateDecisionLock unlock]; + [delegateDecisionLock release]; // Otherwise call ourself on the main thread, waiting until the reply is received. } else { @@ -1470,9 +1471,11 @@ void performThreadedKeepAlive(void *ptr) } if (queryCancelled) { + if (queryErrorMessage) [queryErrorMessage release], queryErrorMessage = nil; queryErrorMessage = [[NSString alloc] initWithString:NSLocalizedString(@"Query cancelled.", @"Query cancelled error")]; queryErrorId = 1317; } else { + if (queryErrorMessage) [queryErrorMessage release], queryErrorMessage = nil; queryErrorMessage = [[NSString alloc] initWithString:[self stringWithCString:mysql_error(mConnection)]]; queryErrorId = mysql_errno(mConnection); -- cgit v1.2.3