[draw] Fix memory leak on bad markup parsing

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-28 21:48:17 +02:00
parent 290672ba09
commit 44890c7c33
1 changed files with 4 additions and 1 deletions

View File

@ -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])