forked from len0rd/rockbox
Theme Editor: Made parser recover memory on error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26703 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
47636e6382
commit
6c9b0358b0
1 changed files with 3 additions and 0 deletions
|
|
@ -78,7 +78,10 @@ struct skin_element* skin_parse(const char* document)
|
||||||
*to_write = skin_parse_viewport(&cursor);
|
*to_write = skin_parse_viewport(&cursor);
|
||||||
last = *to_write;
|
last = *to_write;
|
||||||
if(!last)
|
if(!last)
|
||||||
|
{
|
||||||
|
skin_free_tree(root); /* Clearing any memory already used */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Making sure last is at the end */
|
/* Making sure last is at the end */
|
||||||
while(last->next)
|
while(last->next)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue