upstream: fix memory leak in error path; bz#3074 patch from

krishnaiah.bommu@intel.com, ok dtucker

OpenBSD-Commit-ID: d031853f3ecf47b35a0669588f4d9d8e3b307b3c
This commit is contained in:
djm@openbsd.org 2019-10-04 04:31:59 +00:00 committed by Damien Miller
parent b7fbc75e11
commit 07f2c7f349
1 changed files with 2 additions and 3 deletions

View File

@ -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> * 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)); __func__, ssh_err(r));
free(filename); free(filename);
free(longname); free(longname);
sshbuf_free(msg); goto out;
return -1;
} }
if (print_flag) if (print_flag)