diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2012-10-05 11:08:05 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-10-05 11:45:12 +0200 |
commit | cb53c4f0e1b52de46d04ea2c271452ace354a203 (patch) | |
tree | 5c58f48ebba45d97063131d4d9654a59163d2172 | |
parent | 0d029e7038d074a064e2870ec35441403301d099 (diff) | |
download | libssh-cb53c4f0e1b52de46d04ea2c271452ace354a203.tar.gz libssh-cb53c4f0e1b52de46d04ea2c271452ace354a203.tar.xz libssh-cb53c4f0e1b52de46d04ea2c271452ace354a203.zip |
sftp: Fix a memory on error in sftp_opendir().
(cherry picked from commit b5c4b090da254c1ad3689983b0cb999b09aa3394)
-rw-r--r-- | src/sftp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -940,6 +940,7 @@ sftp_dir sftp_opendir(sftp_session sftp, const char *path){ dir = malloc(sizeof(struct sftp_dir_struct)); if (dir == NULL) { ssh_set_error_oom(sftp->session); + free(file); return NULL; } ZERO_STRUCTP(dir); |