diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-13 20:41:36 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-13 20:41:36 +0000 |
commit | da87ee2564f73d7f578ffb08e5d03073ce49d694 (patch) | |
tree | 6b5a2e11798787e8614779c47611e506daff25b7 /Frameworks/MCPKit/MCPFoundationKit | |
parent | 4b13d761590d65d2b294aaa6c17654edbd0a811e (diff) | |
download | sequelpro-da87ee2564f73d7f578ffb08e5d03073ce49d694.tar.gz sequelpro-da87ee2564f73d7f578ffb08e5d03073ce49d694.tar.bz2 sequelpro-da87ee2564f73d7f578ffb08e5d03073ce49d694.zip |
- Fix some leaks and autoreleases after checking static analysis
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 3 |
1 files changed, 3 insertions, 0 deletions
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); |