[openssh-commits] [openssh] 02/02: upstream: fix some one-off leaks in ssh.c; ok dtucker@
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Sep 25 17:07:37 AEST 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 8235dc3d82c0ac347a3600df0907c6573720fbaa
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Sep 25 07:05:11 2025 +0000
upstream: fix some one-off leaks in ssh.c; ok dtucker@
OpenBSD-Commit-ID: bf3c27ffe4b3cccb6553b554ec4c04929065a2bc
---
ssh.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ssh.c b/ssh.c
index f4524e384..3b03108db 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.618 2025/09/15 04:50:42 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.619 2025/09/25 07:05:11 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1725,8 +1725,6 @@ main(int ac, char **av)
&timeout_ms, options.tcp_keep_alive) != 0)
exit(255);
- if (addrs != NULL)
- freeaddrinfo(addrs);
ssh_packet_set_timeout(ssh, options.server_alive_interval,
options.server_alive_count_max);
@@ -1867,9 +1865,13 @@ main(int ac, char **av)
#endif
skip_connect:
+ if (addrs != NULL)
+ freeaddrinfo(addrs);
exit_status = ssh_session2(ssh, cinfo);
ssh_conn_info_free(cinfo);
- ssh_packet_close(ssh);
+ channel_free_channels(ssh);
+ ssh_packet_free(ssh);
+ pwfree(pw);
if (options.control_path != NULL && muxserver_sock != -1)
unlink(options.control_path);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list