diff options
author | oni-link <knil.ino@gmail.com> | 2014-11-08 04:03:04 +0100 |
---|---|---|
committer | oni-link <knil.ino@gmail.com> | 2014-11-09 10:35:39 +0100 |
commit | dba8433723f1cb5dbfc7e09fde73219aba646f60 (patch) | |
tree | 0b19ca7b6794244cbd2af758cedb4f7734708fb5 | |
parent | cf95d27689ac48c48c6ff2f360439beeac3976af (diff) | |
download | rneovim-dba8433723f1cb5dbfc7e09fde73219aba646f60.tar.gz rneovim-dba8433723f1cb5dbfc7e09fde73219aba646f60.tar.bz2 rneovim-dba8433723f1cb5dbfc7e09fde73219aba646f60.zip |
Try to fix problem found in the Travis Ci build.
An uv_pipe_t handle for a WStream could be left open for a
particular code path.
Patch by tarruda.
-rw-r--r-- | src/nvim/os/wstream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/os/wstream.c b/src/nvim/os/wstream.c index a1f3612418..6a650ce775 100644 --- a/src/nvim/os/wstream.c +++ b/src/nvim/os/wstream.c @@ -230,7 +230,11 @@ static void write_cb(uv_write_t *req, int status) if (data->wstream->freed && data->wstream->pending_reqs == 0) { // Last pending write, free the wstream; - free(data->wstream); + if (data->wstream->free_handle) { + uv_close((uv_handle_t *)data->wstream->stream, close_cb); + } else { + free(data->wstream); + } } kmp_free(WRequestPool, wrequest_pool, data); |