fix minor memory leak in Subsystem option parsing;
authordjm <djm@openbsd.org>
Sat, 17 Aug 2024 08:23:04 +0000 (08:23 +0000)
committerdjm <djm@openbsd.org>
Sat, 17 Aug 2024 08:23:04 +0000 (08:23 +0000)
from Antonio Larrosa via GHPR515

usr.bin/ssh/servconf.c

index b6d6f17..9b4bcfe 100644 (file)
@@ -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 <ylo@cs.hut.fi>, 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;