summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2023-03-07 06:09:15 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2023-03-07 06:09:15 +0000
commit1a0a510c7ad4cd7d6556123d0f9765f2310b8022 (patch)
tree7f0ef3c08909697eea52fd55e275d097b8450788
parentbcbd2e97dff580c9ac4c0ddcd7e7b856a37e78b1 (diff)
Fix mem leak in environment setup. From jjelen at redhat.com via
bz#2687, ok djm@
-rw-r--r--usr.bin/ssh/session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index 41e1ce30a9a..d597c604610 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.334 2023/03/05 05:34:09 dtucker Exp $ */
+/* $OpenBSD: session.c,v 1.335 2023/03/07 06:09:14 dtucker Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -919,6 +919,7 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
}
*value++ = '\0';
child_set_env(&env, &envsize, cp, value);
+ free(cp);
}
/* SSH_CLIENT deprecated */