From cef9981d720ca88a905f65b4c2840ed59a4e6d0c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 27 May 2017 11:00:57 +1000 Subject: [PATCH] Fix leak in append_proxy_line. --- src/generator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generator.c b/src/generator.c index 49b5381e..23c46803 100644 --- a/src/generator.c +++ b/src/generator.c @@ -557,11 +557,11 @@ static char *next_proxy_line(connsock_t *cs, proxy_instance_t *proxi) return buf; } -/* For appending a line to the proxy recv list */ -static void append_proxy_line(proxy_instance_t *proxi, const char *buf) +/* For appending a line to the proxy recv list, absorbing *buf */ +static void append_proxy_line(proxy_instance_t *proxi, char *buf) { char_entry_t *char_t = ckalloc(sizeof(char_entry_t)); - char_t->buf = strdup(buf); + char_t->buf = buf; DL_APPEND(proxi->recvd_lines, char_t); }