[openssh-commits] [openssh] 02/02: upstream: Fix mem leak in environment setup.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Mar 7 17:32:24 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 4710077096edff2e6926dd5b15bf586491d317db
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Tue Mar 7 06:09:14 2023 +0000

    upstream: Fix mem leak in environment setup.
    
    From jjelen at redhat.com via bz#2687, ok djm@
    
    OpenBSD-Commit-ID: 9f9e4ba3cac003e6f81da3bcebd1b9ec43e7f353
---
 session.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/session.c b/session.c
index a08c268f..89dcfdab 100644
--- a/session.c
+++ b/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 at cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1158,6 +1158,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 */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list