Signed-off-by: Corwin-Song <songjuntao@kylinos.cn> (cherry picked from commit aaf74beffae0f0b281357bdf9e895942ee0ed11d)
26 lines
655 B
Diff
26 lines
655 B
Diff
From c1345cb819e50e55ae1d3245e148da90260255ca Mon Sep 17 00:00:00 2001
|
|
From: songjuntao <songjuntao@kylinos.cn>
|
|
Date: Fri, 2 Feb 2024 16:05:29 +0800
|
|
Subject: [PATCH] fix memory leak in kex exchange function
|
|
|
|
Signed-off-by: songjuntao <songjuntao@kylinos.cn>
|
|
---
|
|
sshconnect2.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/sshconnect2.c b/sshconnect2.c
|
|
index b82a118..ae018ff 100644
|
|
--- a/sshconnect2.c
|
|
+++ b/sshconnect2.c
|
|
@@ -354,6 +354,7 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port)
|
|
(r = ssh_packet_write_wait(ssh)) != 0)
|
|
fatal("%s: %s", __func__, ssh_err(r));
|
|
#endif
|
|
+ free(s);
|
|
}
|
|
|
|
/*
|
|
--
|
|
2.33.0
|
|
|