From 1843068a064df097fb76585c9c969ec0f59664bf Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Mon, 18 Jul 2011 16:28:55 +0000 Subject: Fix a memory leak in xtp_page_cl() in case of invalid parameters. From: Fabian Keil --- xxxterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xxxterm.c b/xxxterm.c index b16ff4e..56a63a6 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -4186,8 +4186,7 @@ xtp_page_cl(struct tab *t, struct karg *args) int i = 1; /* all ids start 1 */ GSList *sc, *pc, *pc_start; SoupCookie *c; - char *type, *table_headers; - char *last_domain = strdup(""); + char *type, *table_headers, *last_domain; DNPRINTF(XT_D_CMD, "%s", __func__); @@ -4216,6 +4215,7 @@ xtp_page_cl(struct tab *t, struct karg *args) pc_start = pc; body = NULL; + last_domain = strdup(""); for (; sc; sc = sc->next) { c = sc->data; -- cgit 1.4.1-2-gfad0