summaryrefslogtreecommitdiff
path: root/src/proc_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/proc_open.c')
-rw-r--r--src/proc_open.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/proc_open.c b/src/proc_open.c
index e9393e0..e28b479 100644
--- a/src/proc_open.c
+++ b/src/proc_open.c
@@ -317,6 +317,7 @@ int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err)
proc_read_fd_to_buffer(proc.err.fd, tmp);
if (tmp->used > 0 && write(2, (void*)tmp->ptr, tmp->used) < 0) {
perror("error writing pipe");
+ buffer_free(tmp);
return -1;
}
buffer_free(tmp);