[draw] Fix memory leak on bad markup parsing
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
290672ba09
commit
44890c7c33
|
@ -241,7 +241,10 @@ draw_text_markup_expand(draw_parser_data_t *data,
|
|||
p = markup_parser_data_new(elements, NULL, countof(elements));
|
||||
|
||||
if(!markup_parse(p, str, slen))
|
||||
return a_strdup(str);
|
||||
{
|
||||
markup_parser_data_delete(&p);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* bg */
|
||||
if(p->attribute_names[0])
|
||||
|
|
Loading…
Reference in New Issue