aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.cpp
diff options
context:
space:
mode:
authorGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-16 11:27:50 +0800
committerGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-17 15:55:05 +0800
commita63c0311bbd7ce2831a7b130f07b3a703d51201b (patch)
treed8f16c6be703f1c0af24676024a105370075eaaf /io.cpp
parent9808829ece19fce949a0accde6f2a0f4c4b2202b (diff)
Make io_buffer_t::out_buffer a raw pointer, initialize in io_buffer_t's constructor
Diffstat (limited to 'io.cpp')
-rw-r--r--io.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.cpp b/io.cpp
index 14c48e1b..6c42b6a3 100644
--- a/io.cpp
+++ b/io.cpp
@@ -133,7 +133,6 @@ io_buffer_t *io_buffer_t::create(bool is_input)
{
bool success = true;
io_buffer_t *buffer_redirect = new io_buffer_t(is_input ? 0 : 1);
- buffer_redirect->out_buffer_create();
buffer_redirect->is_input = is_input ? true : false;
if (exec_pipe(buffer_redirect->pipe_fd) == -1)
@@ -163,6 +162,7 @@ io_buffer_t *io_buffer_t::create(bool is_input)
io_buffer_t::~io_buffer_t()
{
+ delete out_buffer;
/**
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.