From c327a7392c2b3e389b9b36970a08524b09dfb6be Mon Sep 17 00:00:00 2001 From: dtucker Date: Fri, 24 Nov 2023 00:31:30 +0000 Subject: [PATCH] Plug mem leak of msg when processing a quit message. Coverity CID#427852, ok djm@ --- usr.bin/ssh/clientloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 * Copyright (c) 1995 Tatu Ylonen , 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; } -- 2.20.1