diff options
author | stuconnolly <stuart02@gmail.com> | 2012-05-02 19:36:58 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-05-02 19:36:58 +0000 |
commit | 74843eab993bd3aac144f2d6ce5e69f76b002bd2 (patch) | |
tree | 979491b96551c262321a530d9d16ab3400a7dfb9 /Source/SPConnectionController.m | |
parent | f04710798a01782fddd4f7e848d8a534dedb2e7e (diff) | |
download | sequelpro-74843eab993bd3aac144f2d6ce5e69f76b002bd2.tar.gz sequelpro-74843eab993bd3aac144f2d6ce5e69f76b002bd2.tar.bz2 sequelpro-74843eab993bd3aac144f2d6ce5e69f76b002bd2.zip |
Fix memory leaks.
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r-- | Source/SPConnectionController.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 58eb4002..a2b3c06c 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -1127,7 +1127,10 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, NSMutableArray *nodes = [[node mutableChildNodes] mutableCopy]; // If this node only has one child and it's not another group node, don't bother proceeding - if (([nodes count] == 1) && (![[nodes objectAtIndex:0] isGroup])) return; + if (([nodes count] == 1) && (![[nodes objectAtIndex:0] isGroup])) { + [nodes release]; + return; + } for (SPTreeNode *treeNode in nodes) { @@ -1166,6 +1169,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [[node mutableChildNodes] setArray:nodes]; + [nodes release]; [groupNodes release]; } |