summaryrefslogtreecommitdiffstats
path: root/sftp-client.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-10-04 06:31:59 +0200
committerDamien Miller <djm@mindrot.org>2019-10-04 06:34:05 +0200
commit07f2c7f34951c04d2cd796ac6c80e47c56c4969e (patch)
tree4eda57aefd71ef0b44a44c16de11ebf6c8000c93 /sftp-client.c
parentupstream: space (diff)
downloadopenssh-07f2c7f34951c04d2cd796ac6c80e47c56c4969e.tar.xz
openssh-07f2c7f34951c04d2cd796ac6c80e47c56c4969e.zip
upstream: fix memory leak in error path; bz#3074 patch from
krishnaiah.bommu@intel.com, ok dtucker OpenBSD-Commit-ID: d031853f3ecf47b35a0669588f4d9d8e3b307b3c
Diffstat (limited to 'sftp-client.c')
-rw-r--r--sftp-client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sftp-client.c b/sftp-client.c
index 4fb618190..72f7fff7a 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.134 2019/07/12 03:56:21 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.135 2019/10/04 04:31:59 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -631,8 +631,7 @@ do_lsreaddir(struct sftp_conn *conn, const char *path, int print_flag,
__func__, ssh_err(r));
free(filename);
free(longname);
- sshbuf_free(msg);
- return -1;
+ goto out;
}
if (print_flag)