aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TunnelPassphraseRequester.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-06-05 22:31:22 +0000
committerrowanbeentje <rowan@beent.je>2009-06-05 22:31:22 +0000
commitf6e926b95da15e963545805345d5afca3db0455e (patch)
tree611a03e1da636ab3a79a446496acd242cfda4f56 /Source/TunnelPassphraseRequester.m
parent549cd7c007abef5d96c1d0fc3194df1db1f09358 (diff)
downloadsequelpro-f6e926b95da15e963545805345d5afca3db0455e.tar.gz
sequelpro-f6e926b95da15e963545805345d5afca3db0455e.tar.bz2
sequelpro-f6e926b95da15e963545805345d5afca3db0455e.zip
- Fix some manual memory releases in r820 which llvm/clang has misidentified (an autorelease is already present).
- Ensure manually allocated memory is correctly releases
Diffstat (limited to 'Source/TunnelPassphraseRequester.m')
-rw-r--r--Source/TunnelPassphraseRequester.m10
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/TunnelPassphraseRequester.m b/Source/TunnelPassphraseRequester.m
index fb44a400..31c4b54a 100644
--- a/Source/TunnelPassphraseRequester.m
+++ b/Source/TunnelPassphraseRequester.m
@@ -47,7 +47,6 @@ int main(int argc, const char *argv[])
sequelProTunnel = (SPSSHTunnel *)[NSConnection rootProxyForConnectionWithRegisteredName:connectionName host:nil];
if (!sequelProTunnel) {
NSLog(@"SSH Tunnel: unable to connect to Sequel Pro to show SSH question");
- [argument release];
[pool release];
return 1;
}
@@ -58,7 +57,6 @@ int main(int argc, const char *argv[])
printf("no\n");
}
[pool release];
- [argument release];
return 0;
}
@@ -81,11 +79,13 @@ int main(int argc, const char *argv[])
keychain = [[KeyChain alloc] init];
if (![keychain passwordExistsForName:keychainName account:keychainAccount]) {
NSLog(@"SSH Tunnel: specified keychain password not found");
+ [keychain release];
[pool release];
return 1;
}
printf("%s\n", [[keychain getPasswordForName:keychainName account:keychainAccount] UTF8String]);
+ [keychain release];
[pool release];
return 0;
}
@@ -116,7 +116,6 @@ int main(int argc, const char *argv[])
printf("%s\n", [password UTF8String]);
[pool release];
- [argument release];
return 0;
}
}
@@ -128,7 +127,6 @@ int main(int argc, const char *argv[])
if (!verificationHash) {
NSLog(@"SSH Tunnel: key passphrase authentication required but insufficient details supplied to connect to GUI");
[pool release];
- [argument release];
return 1;
}
@@ -136,23 +134,19 @@ int main(int argc, const char *argv[])
if (!sequelProTunnel) {
NSLog(@"SSH Tunnel: unable to connect to Sequel Pro to show SSH question");
[pool release];
- [argument release];
return 1;
}
passphrase = [sequelProTunnel getPasswordForQuery:argument verificationHash:verificationHash];
if (!passphrase) {
[pool release];
- [argument release];
return 1;
}
printf("%s\n", [passphrase UTF8String]);
[pool release];
- [argument release];
return 0;
}
[pool release];
- [argument release];
return 1;
}