crFinish or crFinishV, since they will attempt to write to the
coroutine state variable contained in that structure. Introduced some
new all-in-one macros crFinishFree and crFinishFreeV, and used those
instead. Should fix today's report of a crash just after authentication.
git-svn-id: svn://svn.tartarus.org/sgt/putty@9630
cda61777-01e9-0310-a592-
d414129be87e
#define crState(t) crStateP(t, ssh->t)
#define crFinish(z) } *crLine = 0; return (z); }
#define crFinishV } *crLine = 0; return; }
#define crState(t) crStateP(t, ssh->t)
#define crFinish(z) } *crLine = 0; return (z); }
#define crFinishV } *crLine = 0; return; }
+#define crFinishFree(z, s) } *crLine = 0; sfree(s); return (z); }
+#define crFinishFreeV(s) } *crLine = 0; sfree(s); return; }
#define crReturn(z) \
do {\
*crLine =__LINE__; return (z); case __LINE__:;\
#define crReturn(z) \
do {\
*crLine =__LINE__; return (z); case __LINE__:;\
logevent("X11 forwarding refused");
}
}
logevent("X11 forwarding refused");
}
}
}
static void ssh2_maybe_setup_agent(struct ssh_channel *c, struct Packet *pktin,
}
static void ssh2_maybe_setup_agent(struct ssh_channel *c, struct Packet *pktin,
logevent("Agent forwarding refused");
}
}
logevent("Agent forwarding refused");
}
}
}
static void ssh2_maybe_setup_pty(struct ssh_channel *c, struct Packet *pktin,
}
static void ssh2_maybe_setup_pty(struct ssh_channel *c, struct Packet *pktin,
} else {
ssh->editing = ssh->echoing = 1;
}
} else {
ssh->editing = ssh->echoing = 1;
}
}
static void ssh2_setup_env(struct ssh_channel *c, struct Packet *pktin,
}
static void ssh2_setup_env(struct ssh_channel *c, struct Packet *pktin,
c_write_str(ssh, "Server refused to set all environment variables\r\n");
}
}
c_write_str(ssh, "Server refused to set all environment variables\r\n");
}
}
-out:
- sfree(s);
- crFinishV;
+ out:;
+ crFinishFreeV(s);