summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2023-11-24 00:31:31 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2023-11-24 00:31:31 +0000
commit69e8504d3b3f782fce52566a708000b41ceef4aa (patch)
treee3f2f8386e508c031f92898199f80ea76c6a2955 /usr.bin
parent107af09e9e8a13a6c550b3b8c8b22f849a14291a (diff)
Plug mem leak of msg when processing a quit message.
Coverity CID#427852, ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/clientloop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index ffa0facaf76..6fa70cb7c33 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.401 2023/11/15 22:51:49 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.402 2023/11/24 00:31:30 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -202,6 +202,7 @@ quit_message(const char *fmt, ...)
if ((r = sshbuf_putf(stderr_buffer, "%s\r\n", msg)) != 0)
fatal_fr(r, "sshbuf_putf");
+ free(msg);
quit_pending = 1;
}