Mercurial > dropbear
changeset 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 | 6aea2cfc113e |
children | 1bfa65fed772 75940fef22dd |
files | svr-chansession.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
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"); }