mirror of
https://github.com/openbsd/src.git
synced 2026-04-28 08:07:03 +00:00
fix some one-off leaks in ssh.c; ok dtucker@
This commit is contained in:
@@ -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@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -1708,8 +1708,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);
|
||||
@@ -1850,9 +1848,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);
|
||||
|
||||
Reference in New Issue
Block a user