diff options
author | 2013-01-15 17:02:46 +0800 | |
---|---|---|
committer | 2013-01-17 15:55:05 +0800 | |
commit | 0f443ef37b21bdc7d97db394842055f7b6e755a6 (patch) | |
tree | a2102b6ab46bd6f1f312322a386c6a9a2934ddf5 /io.cpp | |
parent | a20e0b9e2eb25b16e8416ac7758c2da0216dc6d8 (diff) |
Convert io_buffer_destroy to ~io_buffer_t
Diffstat (limited to 'io.cpp')
-rw-r--r-- | io.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -161,19 +161,19 @@ io_buffer_t *io_buffer_create(bool is_input) return buffer_redirect; } -void io_buffer_destroy(const shared_ptr<io_buffer_t> &io_buffer) +io_buffer_t::~io_buffer_t() { /** If this is an input buffer, then io_read_buffer will not have been called, and we need to close the output fd as well. */ - if (io_buffer->is_input) + if (is_input) { - exec_close(io_buffer->param1.pipe_fd[1]); + exec_close(param1.pipe_fd[1]); } - exec_close(io_buffer->param1.pipe_fd[0]); + exec_close(param1.pipe_fd[0]); /* Dont free fd for writing. This should already be free'd before |