aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2009-07-15 15:08:55 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2009-07-15 15:08:55 +0000
commit2431a280eb7612920a7158d72c1d34964b801445 (patch)
treefe90e04b02f7b1cafcd9b5f5236b0bd0e889412a
parent0eabd863007642ab2e22a7aab72345c32db94822 (diff)
downloadsshfs-2431a280eb7612920a7158d72c1d34964b801445.tar
sshfs-2431a280eb7612920a7158d72c1d34964b801445.tar.gz
sshfs-2431a280eb7612920a7158d72c1d34964b801445.tar.bz2
sshfs-2431a280eb7612920a7158d72c1d34964b801445.zip
tear down mount on connect failure
-rw-r--r--sshfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sshfs.c b/sshfs.c
index cc29799..2455fff 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -3310,8 +3310,10 @@ int main(int argc, char *argv[])
exit(1);
res = ssh_connect();
- if (res == -1)
+ if (res == -1) {
+ fuse_teardown(fuse, mountpoint);
exit(1);
+ }
if (multithreaded)
res = fuse_loop_mt(fuse);