1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-19 12:08:05 -05:00

mainchan.c: defer a couple of ssh_sw_abort.

When a subsidiary part of the SSH system wants to abort the whole
connection, it's supposed to call ssh_sw_abort_deferred, on pain of
free-order confusion. Elsewhere in mainchan.c I was getting this
right, but I missed a couple.
This commit is contained in:
Simon Tatham 2022-04-22 17:15:34 +01:00
parent 5388e5f7ee
commit 38a5f59c75

View File

@ -296,7 +296,7 @@ static void mainchan_request_response(Channel *chan, bool success)
* If there's no remote_cmd2 configured, then we have no * If there's no remote_cmd2 configured, then we have no
* fallback command, so we've run out of options. * fallback command, so we've run out of options.
*/ */
ssh_sw_abort(mc->ppl->ssh, ssh_sw_abort_deferred(mc->ppl->ssh,
"Server refused to start a shell/command"); "Server refused to start a shell/command");
} }
return; return;
@ -310,7 +310,7 @@ static void mainchan_request_response(Channel *chan, bool success)
ssh_got_fallback_cmd(mc->ppl->ssh); ssh_got_fallback_cmd(mc->ppl->ssh);
mainchan_ready(mc); mainchan_ready(mc);
} else { } else {
ssh_sw_abort(mc->ppl->ssh, ssh_sw_abort_deferred(mc->ppl->ssh,
"Server refused to start a shell/command"); "Server refused to start a shell/command");
} }
return; return;