From 8c2eeede9e63e32aebe3e3425a70d7e2f7185dce Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 18 May 2011 09:51:52 +0200 Subject: [PATCH] Fix leak WRT wrbuf usage --- src/http_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/http_command.c b/src/http_command.c index bbd6b83..4684d26 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -543,7 +543,7 @@ static void cmd_termlist(struct http_channel *c) const char *nums = http_argbyname(rq, "num"); int num = 15; int status; - WRBUF debug_log = wrbuf_alloc(); + WRBUF debug_log = 0; if (!s) return; @@ -557,6 +557,8 @@ static void cmd_termlist(struct http_channel *c) if (nums) num = atoi(nums); + debug_log = wrbuf_alloc(); + wrbuf_rewind(c->wrbuf); wrbuf_puts(c->wrbuf, "\n"); -- 1.7.10.4