upstream: Plug mem leak of msg when processing a quit message.

Coverity CID#427852, ok djm@

OpenBSD-Commit-ID: bf85362addbe2134c3d8c4b80f16601fbff823b7
This commit is contained in:
dtucker@openbsd.org 2023-11-24 00:31:30 +00:00 committed by Darren Tucker
parent 1d7f9b6e29
commit 3d44a5c565
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -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
@ -211,6 +211,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;
}