From: Adam Dickmeiss Date: Wed, 18 May 2011 07:51:52 +0000 (+0200) Subject: Fix leak WRT wrbuf usage X-Git-Tag: v1.5.7~13^2~14 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=8c2eeede9e63e32aebe3e3425a70d7e2f7185dce;p=pazpar2-moved-to-github.git Fix leak WRT wrbuf usage --- 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");