From 25fc8795825a54d20e41958071312ccc0ffec1f4 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sun, 22 Jun 2008 20:59:36 +0200 Subject: [PATCH] Stupid memory leak fixed. Signed-off-by: Pierre Habouzit --- widgets/taglist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/taglist.c b/widgets/taglist.c index 64df4e72..680c6177 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -67,7 +67,8 @@ static char * tag_markup_parse(tag_t *t, const char *str, ssize_t len) { static char const * const elements[] = { "title", NULL }; - markup_parser_data_t p = { + markup_parser_data_t p = + { .elements = elements, .on_element = &tag_markup_on_elem, .priv = t->name, @@ -183,7 +184,10 @@ taglist_draw(draw_context_t *ctx, int screen, widget_node_t *w, tag = tag->next, area = area->next, i++) { if (!data->show_empty && !tag->selected && !tag_isoccupied(tag)) + { + p_delete(&text[i]); continue; + } area->x = w->area.x + prev_width; prev_width += area->width;