From: dtucker Date: Fri, 24 Nov 2023 00:31:30 +0000 (+0000) Subject: Plug mem leak of msg when processing a quit message. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c327a7392c2b3e389b9b36970a08524b09dfb6be;p=openbsd Plug mem leak of msg when processing a quit message. Coverity CID#427852, ok djm@ --- 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; }