зеркало из https://github.com/github/putty.git
Yet another possible segfault path in the backends fixed. I don't
_believe_ I'm still finding these. I have no idea what I was thinking when I wrote this stuff. [originally from svn r1162]
This commit is contained in:
Родитель
86e1a95166
Коммит
a4c1aad9b2
6
raw.c
6
raw.c
|
@ -23,8 +23,10 @@ static void c_write(char *buf, int len)
|
|||
static int raw_closing(Plug plug, char *error_msg, int error_code,
|
||||
int calling_back)
|
||||
{
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
if (s) {
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
}
|
||||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
connection_fatal(error_msg);
|
||||
|
|
6
rlogin.c
6
rlogin.c
|
@ -24,8 +24,10 @@ static void c_write(char *buf, int len)
|
|||
static int rlogin_closing(Plug plug, char *error_msg, int error_code,
|
||||
int calling_back)
|
||||
{
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
if (s) {
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
}
|
||||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
connection_fatal(error_msg);
|
||||
|
|
6
ssh.c
6
ssh.c
|
@ -1478,8 +1478,10 @@ static int ssh_closing(Plug plug, char *error_msg, int error_code,
|
|||
int calling_back)
|
||||
{
|
||||
ssh_state = SSH_STATE_CLOSED;
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
if (s) {
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
}
|
||||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
connection_fatal(error_msg);
|
||||
|
|
6
telnet.c
6
telnet.c
|
@ -565,8 +565,10 @@ static void do_telnet_read(char *buf, int len)
|
|||
static int telnet_closing(Plug plug, char *error_msg, int error_code,
|
||||
int calling_back)
|
||||
{
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
if (s) {
|
||||
sk_close(s);
|
||||
s = NULL;
|
||||
}
|
||||
if (error_msg) {
|
||||
/* A socket error has occurred. */
|
||||
connection_fatal(error_msg);
|
||||
|
|
Загрузка…
Ссылка в новой задаче