From b69f37a5bd43fb790cdd6ba14757675222cf057e Mon Sep 17 00:00:00 2001 From: djm Date: Sun, 20 Mar 2022 08:52:17 +0000 Subject: [PATCH] don't leak argument list; bz3404, reported by Balu Gajjala ok dtucker@ --- usr.bin/ssh/scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index d2f625256f2..fc5d99ea2da 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.246 2022/02/23 19:01:00 deraadt Exp $ */ +/* $OpenBSD: scp.c,v 1.247 2022/03/20 08:52:17 djm Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -935,7 +935,7 @@ do_sftp_connect(char *host, char *user, int port, char *sftp_direct, return NULL; } else { - args.list = NULL; + freeargs(&args); addargs(&args, "sftp-server"); if (do_cmd(sftp_direct, host, NULL, -1, 0, "sftp", reminp, remoutp, pidp) < 0) -- 2.20.1