diff svr-chansession.c @ 372:fbcc3b5b34f3

comment about putenv() leaking malloced variables
author Matt Johnston <matt@ucc.asn.au>
date Thu, 02 Nov 2006 16:52:59 +0000
parents 8eaa6e3ca6eb
children a124aff0cbf1
line wrap: on
line diff
--- a/svr-chansession.c	Thu Nov 02 16:45:43 2006 +0000
+++ b/svr-chansession.c	Thu Nov 02 16:52:59 2006 +0000
@@ -997,6 +997,7 @@
 	newvar[plen] = '=';
 	memcpy(&newvar[plen+1], var, vlen);
 	newvar[plen+vlen+1] = '\0';
+	/* newvar is leaked here, but that's part of putenv()'s semantics */
 	if (putenv(newvar) < 0) {
 		dropbear_exit("environ error");
 	}