aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.cpp
diff options
context:
space:
mode:
authorGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-17 15:46:10 +0800
committerGravatar Cheer Xiao <xiaqqaix@gmail.com>2013-01-17 15:55:06 +0800
commite0c858478ad564712d9b2a2799abff8496dcc55c (patch)
tree2b54a468a0e03887acb0505d3260eaa1685912b4 /io.cpp
parenta3b15b995e9448e1ed34b1a9d4d168abdf161b6e (diff)
Revert "Make io_buffer_t::out_buffer a raw pointer, initialize in io_buffer_t's constructor"
This reverts commit d48ffab9d67da48cf45c2f5560c21a767144545f. Conflicts: io.cpp io.h
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 241f89d9..dfda6e55 100644
--- a/io.cpp
+++ b/io.cpp
@@ -135,6 +135,7 @@ 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, is_input);
+ buffer_redirect->out_buffer_create();
if (exec_pipe(buffer_redirect->pipe_fd) == -1)
{
@@ -163,7 +164,6 @@ 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.