aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TunnelPassphraseRequester.m
diff options
context:
space:
mode:
authorbamse16 <marius@marius.me.uk>2009-06-05 15:07:25 +0000
committerbamse16 <marius@marius.me.uk>2009-06-05 15:07:25 +0000
commit67a3148cec8bc7d1c6f52f60c8ce93a4fe0b8ece (patch)
tree14dbf0a8861ade6a232dfe2d0fdfab0807375aa5 /Source/TunnelPassphraseRequester.m
parentb3d173a9bf9ade79a06202b5666b105936ef0dff (diff)
downloadsequelpro-67a3148cec8bc7d1c6f52f60c8ce93a4fe0b8ece.tar.gz
sequelpro-67a3148cec8bc7d1c6f52f60c8ce93a4fe0b8ece.tar.bz2
sequelpro-67a3148cec8bc7d1c6f52f60c8ce93a4fe0b8ece.zip
Fixed some memory leaks found using llvm/clang. There are still some to fix
Diffstat (limited to 'Source/TunnelPassphraseRequester.m')
-rw-r--r--Source/TunnelPassphraseRequester.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/TunnelPassphraseRequester.m b/Source/TunnelPassphraseRequester.m
index 360af00d..fb44a400 100644
--- a/Source/TunnelPassphraseRequester.m
+++ b/Source/TunnelPassphraseRequester.m
@@ -47,6 +47,7 @@ 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;
}
@@ -57,6 +58,7 @@ int main(int argc, const char *argv[])
printf("no\n");
}
[pool release];
+ [argument release];
return 0;
}
@@ -114,6 +116,7 @@ int main(int argc, const char *argv[])
printf("%s\n", [password UTF8String]);
[pool release];
+ [argument release];
return 0;
}
}
@@ -125,6 +128,7 @@ 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;
}
@@ -132,19 +136,23 @@ 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;
-} \ No newline at end of file
+}