mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
upstream: Plug mem leak on globbed ls error path.
Spotted by Coverity, ok deraadt@ OpenBSD-Commit-ID: de28476025db29820a9a2e56e98b964d8a02861c
This commit is contained in:
parent
aa33b4d396
commit
803392933a
3
sftp.c
3
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@openbsd.org>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
@ -1030,6 +1030,7 @@ do_globbed_ls(struct sftp_conn *conn, const char *path,
|
|||||||
if (lflag & LS_LONG_VIEW) {
|
if (lflag & LS_LONG_VIEW) {
|
||||||
if (g.gl_statv[i] == NULL) {
|
if (g.gl_statv[i] == NULL) {
|
||||||
error("no stat information for %s", fname);
|
error("no stat information for %s", fname);
|
||||||
|
free(fname);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
lname = ls_file(fname, g.gl_statv[i], 1,
|
lname = ls_file(fname, g.gl_statv[i], 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user