[openssh-commits] [openssh] 01/02: upstream: Plug mem leak on globbed ls error path.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Feb 28 20:03:03 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 803392933a3a6f09f834aa5f0c2aab06a3b382f4
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Mon Feb 27 22:12:40 2023 +0000

    upstream: Plug mem leak on globbed ls error path.
    
     Spotted by Coverity, ok deraadt@
    
    OpenBSD-Commit-ID: de28476025db29820a9a2e56e98b964d8a02861c
---
 sftp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sftp.c b/sftp.c
index b3616c15..deb975cb 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.225 2023/01/05 05:49:13 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.226 2023/02/27 22:12:40 dtucker Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
  *
@@ -1030,6 +1030,7 @@ do_globbed_ls(struct sftp_conn *conn, const char *path,
 		if (lflag & LS_LONG_VIEW) {
 			if (g.gl_statv[i] == NULL) {
 				error("no stat information for %s", fname);
+				free(fname);
 				continue;
 			}
 			lname = ls_file(fname, g.gl_statv[i], 1,

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list