Mercurial > dropbear
diff svr-chansession.c @ 415:8b9aba1d5fa4 channel-fix
merge of '73fe066c5d9e2395354ba74756124d45c978a04d'
and 'f5014cc84558f1e8eba42dbecf9f72f94bfe6134'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Feb 2007 16:00:18 +0000 |
parents | 173a5f89666c |
children | a01c0c8e543a |
line wrap: on
line diff
--- a/svr-chansession.c Tue Feb 06 15:59:54 2007 +0000 +++ b/svr-chansession.c Tue Feb 06 16:00:18 2007 +0000 @@ -101,7 +101,7 @@ /* If the pid wasn't matched, then we might have hit the race mentioned * above. So we just store the info for the parent to deal with */ - if (!exit) { + if (exit == NULL) { exit = &svr_ses.lastexit; } @@ -1007,6 +1007,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"); }