artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c35fbcd
)
Plug mem leak on globbed ls error path. Spotted by Coverity, ok deraadt@
author
dtucker
<dtucker@openbsd.org>
Mon, 27 Feb 2023 22:12:40 +0000
(22:12 +0000)
committer
dtucker
<dtucker@openbsd.org>
Mon, 27 Feb 2023 22:12:40 +0000
(22:12 +0000)
usr.bin/ssh/sftp.c
patch
|
blob
|
history
diff --git
a/usr.bin/ssh/sftp.c
b/usr.bin/ssh/sftp.c
index
7654fed
..
2cd3aa2
100644
(file)
--- a/
usr.bin/ssh/sftp.c
+++ b/
usr.bin/ssh/sftp.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: sftp.c,v 1.22
5 2023/01/05 05:49:13 djm
Exp $ */
+/* $OpenBSD: sftp.c,v 1.22
6 2023/02/27 22:12:40 dtucker
Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@
-1003,6
+1003,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,