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

Fix confusion between invalid Windows HANDLE values.

I was checking a HANDLE against INVALID_HANDLE_VALUE to decide whether
it should be closed. But ten lines further up, I was setting it
manually to NULL to suppress the close. Oops.
This commit is contained in:
Simon Tatham 2021-05-13 18:20:41 +01:00
parent 0e83e72b09
commit 155d8121e6

View File

@ -260,7 +260,7 @@ static agent_pending_query *named_pipe_agent_query(
pq = snew(agent_pending_query);
pq->handle = handle_input_new(pipehandle, named_pipe_agent_gotdata, pq, 0);
pipehandle = NULL; /* prevent it being closed below */
pipehandle = INVALID_HANDLE_VALUE; /* prevent it being closed below */
pq->response = strbuf_new_nm();
pq->callback = callback;
pq->callback_ctx = callback_ctx;