aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sshfs.c b/sshfs.c
index 0aa325c..7827dda 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -773,8 +773,7 @@ static int sftp_request(uint8_t type, const struct buffer *buf,
buf_free(&req->reply);
sem_destroy(&req->ready);
free(req);
- return err;
-
+ return err;
}
static int sshfs_getattr(const char *path, struct stat *stbuf)
@@ -1184,12 +1183,12 @@ int main(int argc, char *argv[])
break;
default:
- newargv[newargc++] = arg;
+ newargv[newargc++] = strdup(arg);
}
} else if (!host && strchr(arg, ':'))
host = g_strdup(arg);
else
- newargv[newargc++] = arg;
+ newargv[newargc++] = strdup(arg);
}
if (!host) {
fprintf(stderr, "missing host\n");