diff options
author | Marco Peereboom <marco@conformal.com> | 2011-07-18 16:28:55 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2011-07-18 16:28:55 +0000 |
commit | 1843068a064df097fb76585c9c969ec0f59664bf (patch) | |
tree | 7d3be7562f54d47f2d935262d7b60c2e40a22469 | |
parent | 3fc4d365052cbce9c8577dc2a682ba7db43675dc (diff) | |
download | xombrero-1843068a064df097fb76585c9c969ec0f59664bf.tar.gz |
Fix a memory leak in xtp_page_cl() in case of invalid parameters.
From: Fabian Keil <fk@fabiankeil.de>
-rw-r--r-- | xxxterm.c | 4 |
1 files 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; |