[PATCH v2] Fix memory leak in 'handle' allocated through function 'get_handle'

krishnaiah bommu krishnaiah.bommu at intel.com
Thu Sep 26 21:16:49 AEST 2019


---
Change log:
v1->v2
- Fixed review comments received in v1

 sftp-client.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sftp-client.c b/sftp-client.c
index 4fb6181..9503cc3 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -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)
-- 
2.7.4



More information about the openssh-unix-dev mailing list