[client] Free markup data
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
39364393f4
commit
088446e97d
12
client.c
12
client.c
|
@ -820,13 +820,21 @@ client_markup_parse(client_t *c, const char *str, ssize_t len)
|
||||||
const char *elements[] = { "title", NULL };
|
const char *elements[] = { "title", NULL };
|
||||||
const char *elements_sub[] = { c->name , NULL };
|
const char *elements_sub[] = { c->name , NULL };
|
||||||
markup_parser_data_t *p;
|
markup_parser_data_t *p;
|
||||||
|
char *ret;
|
||||||
|
|
||||||
p = markup_parser_data_new(elements, elements_sub, countof(elements));
|
p = markup_parser_data_new(elements, elements_sub, countof(elements));
|
||||||
|
|
||||||
if(!markup_parse(p, str, len))
|
if(markup_parse(p, str, len))
|
||||||
|
{
|
||||||
|
ret = p->text;
|
||||||
|
p->text = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
return a_strdup(str);
|
return a_strdup(str);
|
||||||
|
|
||||||
return p->text;
|
markup_parser_data_delete(&p);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the transparency of the selected client.
|
/** Set the transparency of the selected client.
|
||||||
|
|
Loading…
Reference in New Issue