summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-07-17 16:11:16 (GMT)
committer Andreas Schneider <asn@cryptomilk.org>2012-07-17 16:13:03 (GMT)
commit4d8420f3282ed07fc99fc5e930c17df27ef1e9b2 (patch)
tree89abf7f8630386dcbed83810841c3af17e3963ed
parentd8f2a793d36f8144d07200dfa1f81b1e1e1299b8 (diff)
downloadlibssh-4d8420f3282ed07fc99fc5e930c17df27ef1e9b2.zip
libssh-4d8420f3282ed07fc99fc5e930c17df27ef1e9b2.tar.gz
libssh-4d8420f3282ed07fc99fc5e930c17df27ef1e9b2.tar.bz2
sftp: Fix bug in sftp_mkdir not returning on error.
resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
-rw-r--r--src/sftp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sftp.c b/src/sftp.c
index 4c249e3..e390734 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -2269,6 +2269,7 @@ int sftp_mkdir(sftp_session sftp, const char *directory, mode_t mode) {
sftp_packet_write(sftp, SSH_FXP_MKDIR, buffer) < 0) {
ssh_buffer_free(buffer);
ssh_string_free(path);
+ return -1;
}
ssh_buffer_free(buffer);
ssh_string_free(path);