summaryrefslogtreecommitdiffhomepage
path: root/cli-agentfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-03-01 21:16:09 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-03-01 21:16:09 +0800
commitf367273549350d99f476ad140b083d10a212d186 (patch)
tree761c2f8cf3f5003ecf1dd7ce484d41ab4e8c6c22 /cli-agentfwd.c
parent91ef9b2fa99db1ddc3a12a393472fb3a387cf959 (diff)
allocate buffer and data in a single allocation
--HG-- branch : nocircbuffer
Diffstat (limited to 'cli-agentfwd.c')
-rw-r--r--cli-agentfwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c
index aea5e64..c9bc9db 100644
--- a/cli-agentfwd.c
+++ b/cli-agentfwd.c
@@ -155,7 +155,7 @@ static buffer * agent_request(unsigned char type, buffer *data) {
goto out;
}
- buf_resize(inbuf, readlen);
+ inbuf = buf_resize(inbuf, readlen);
buf_setpos(inbuf, 0);
ret = atomicio(read, fd, buf_getwriteptr(inbuf, readlen), readlen);
if ((size_t)ret != readlen) {