diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2021-11-06 10:13:40 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2021-11-06 10:13:40 +0000 |
commit | 05582389799ddd1358463bbbfb77b6f443f300f0 (patch) | |
tree | e69f751436dd142d250eec01e59efd48c0236819 /usr.bin | |
parent | f7e7c12323df897cfa0674e73878499fc14421b6 (diff) |
Plug a couple of minor mem leaks. From beldmit at gmail.com via github
PR#283, ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sftp-client.c | 3 | ||||
-rw-r--r-- | usr.bin/ssh/sftp-server.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c index 3507a366ecc..754c6a91d25 100644 --- a/usr.bin/ssh/sftp-client.c +++ b/usr.bin/ssh/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.156 2021/10/24 21:24:17 deraadt Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.157 2021/11/06 10:13:39 dtucker Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -2170,6 +2170,7 @@ handle_dest_replies(struct sftp_conn *to, const char *to_path, int synchronous, (*nreqsp)--; } debug3_f("done: %u outstanding replies", *nreqsp); + sshbuf_free(msg); } int diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c index a6fdb73fbed..53382fdac07 100644 --- a/usr.bin/ssh/sftp-server.c +++ b/usr.bin/ssh/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.129 2021/08/09 23:47:44 djm Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.130 2021/11/06 10:13:39 dtucker Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -1522,6 +1522,7 @@ process_extended_expand(u_int32_t id) npath = xstrdup(path + 2); free(path); xasprintf(&path, "%s/%s", cwd, npath); + free(npath); } else { /* ~user expansions */ if (tilde_expand(path, pw->pw_uid, &npath) != 0) { |