summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2007-02-06 16:00:18 +0000
committerMatt Johnston <matt@ucc.asn.au>2007-02-06 16:00:18 +0000
commitcda7af7ca2fe9fb8d848e7891a528e63531a4e8d (patch)
tree936cdb192e15a456a67d52ab439841b4610404c2 /svr-chansession.c
parentd199e0b1196f39509a92e31d6843193d828bcfab (diff)
parentb1217873364b9c6aa974462b466a795f224249f3 (diff)
merge of '73fe066c5d9e2395354ba74756124d45c978a04d'
and 'f5014cc84558f1e8eba42dbecf9f72f94bfe6134' --HG-- branch : channel-fix extra : convert_revision : cc6095ce978e5f9e51ece6f1717499bc73594bcc
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 99a67e9..a45e7a6 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -101,7 +101,7 @@ static void sesssigchild_handler(int UNUSED(dummy)) {
/* 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 @@ void addnewvar(const char* param, const char* var) {
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");
}