1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

winpgntc: fix mishandling of named-pipe errors.

If named_pipe_agent_gotdata was called with an error or EOF status, it
would call agent_cancel_query(pq), but then accidentally fall through
to the non-error handler which would dereference pq. I meant to return
early in that situation, and Coverity spotted that I'd left out the
early return statement.
This commit is contained in:
Simon Tatham 2021-04-09 17:57:10 +01:00
parent fc8550c07b
commit 165f630ae9

View File

@ -195,6 +195,7 @@ static size_t named_pipe_agent_gotdata(
if (err || len == 0) {
pq->callback(pq->callback_ctx, NULL, 0);
agent_cancel_query(pq);
return 0;
}
int status = named_pipe_agent_accumulate_response(pq->response, data, len);