From 1502e99d2218ffb5d1f4f053e8861a20f9baeae3 Mon Sep 17 00:00:00 2001 From: djm Date: Sat, 17 Aug 2024 08:23:04 +0000 Subject: [PATCH] fix minor memory leak in Subsystem option parsing; from Antonio Larrosa via GHPR515 --- usr.bin/ssh/servconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index b6d6f17e347..9b4bcfeea32 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.412 2024/07/25 23:44:01 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.413 2024/08/17 08:23:04 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1857,6 +1857,7 @@ process_server_config_line_depth(ServerOptions *options, char *line, xasprintf(&options->subsystem_args[options->num_subsystems], "%s%s%s", arg, *arg2 == '\0' ? "" : " ", arg2); free(arg2); + free(arg); argv_consume(&ac); options->num_subsystems++; break; -- 2.20.1