]> source.dussan.org Git - rspamd.git/commitdiff
Plug memory leak in html parser
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Oct 2015 15:35:31 +0000 (16:35 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Oct 2015 15:35:31 +0000 (16:35 +0100)
src/libserver/html.c

index 46e7cfbaa47dade8eace5d437d3bf921c1a5ed1a..248e57bf5f74a9738795d61a186b82f1f031c2f2 100644 (file)
@@ -961,7 +961,7 @@ rspamd_html_process_tag (rspamd_mempool_t *pool, struct html_content *hc,
        comp->type = (comp_type);                                                                       \
        comp->start = NULL;                                                                                     \
        comp->len = 0;                                                                                          \
-       tag->params = g_list_prepend (tag->params, comp);                       \
+       tag->params = g_list_append (tag->params, comp);                        \
        ret = TRUE;                                                                                                     \
 } while(0)