diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-15 00:15:23 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-15 00:15:23 +0000 |
commit | 5a6d0f17bbf6b09463b908182dc2cbb112a0c6cb (patch) | |
tree | 4eb9575d7de321fc6f454892d0df13ddc4b6ce39 /Frameworks/MCPKit | |
parent | 927784129ffd4d30e35f92a3fe6a8582219c64db (diff) | |
download | sequelpro-5a6d0f17bbf6b09463b908182dc2cbb112a0c6cb.tar.gz sequelpro-5a6d0f17bbf6b09463b908182dc2cbb112a0c6cb.tar.bz2 sequelpro-5a6d0f17bbf6b09463b908182dc2cbb112a0c6cb.zip |
Following a manual code review, fix some local variables overriding global variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 1 | ||||
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPResult.m | 12 | ||||
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 19624652..f04fe226 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -105,6 +105,7 @@ static BOOL sTruncateLongFieldInLogs = YES; queryCancelled = NO; queryCancelUsedReconnect = NO; serverVersionString = nil; + mTimeZone = nil; // Initialize ivar defaults connectionTimeout = 10; diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m index 4e3fef3a..be8a85eb 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPResult.m @@ -253,7 +253,7 @@ const OUR_CHARSET our_charsets60[] = if (mNames) { [mNames release]; - mNames = NULL; + mNames = nil; } mNumOfFields = 0; @@ -280,7 +280,7 @@ const OUR_CHARSET our_charsets60[] = if (mNames) { [mNames release]; - mNames = NULL; + mNames = nil; } mResult = mysql_store_result(mySQLPtr); @@ -315,7 +315,7 @@ const OUR_CHARSET our_charsets60[] = if (mNames) { [mNames release]; - mNames = NULL; + mNames = nil; } mResult = mySQLResPtr; @@ -874,7 +874,7 @@ const OUR_CHARSET our_charsets60[] = return (0); } - if (mNames == NULL) { + if (mNames == nil) { [self fetchFieldNames]; } @@ -959,7 +959,7 @@ const OUR_CHARSET our_charsets60[] = return (NO); } - if (mNames == NULL) { + if (mNames == nil) { [self fetchFieldNames]; } @@ -1342,7 +1342,7 @@ const OUR_CHARSET our_charsets60[] = - (void) dealloc { if (mResult) mysql_free_result(mResult); - if (mNames) [mNames autorelease]; + if (mNames) [mNames release]; if (mTimeZone) [mTimeZone release]; [super dealloc]; diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m index 58a8c3a6..624f132c 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m @@ -83,7 +83,7 @@ if (mNames) { [mNames release]; - mNames = NULL; + mNames = nil; } mResult = mysql_use_result(mySQLPtr); |