win: fix uv__pipe_accept memory leak (#3767)

This commit is contained in:
number201724 2022-09-26 17:35:23 +08:00 committed by GitHub
parent c798dd7ae5
commit 81264cfcaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1067,11 +1067,12 @@ int uv__pipe_accept(uv_pipe_t* server, uv_stream_t* client) {
err = uv__tcp_xfer_import(
(uv_tcp_t*) client, item->xfer_type, &item->xfer_info);
uv__free(item);
if (err != 0)
return err;
uv__free(item);
} else {
pipe_client = (uv_pipe_t*) client;
uv__pipe_connection_init(pipe_client);