mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48: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:
parent
0e83e72b09
commit
155d8121e6
@ -260,7 +260,7 @@ static agent_pending_query *named_pipe_agent_query(
|
|||||||
|
|
||||||
pq = snew(agent_pending_query);
|
pq = snew(agent_pending_query);
|
||||||
pq->handle = handle_input_new(pipehandle, named_pipe_agent_gotdata, pq, 0);
|
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->response = strbuf_new_nm();
|
||||||
pq->callback = callback;
|
pq->callback = callback;
|
||||||
pq->callback_ctx = callback_ctx;
|
pq->callback_ctx = callback_ctx;
|
||||||
|
Loading…
Reference in New Issue
Block a user