forked from len0rd/rockbox
Cleanup and oops spotted by Alexander Levin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28483 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f772d56c61
commit
c8f143fed8
1 changed files with 3 additions and 2 deletions
|
@ -66,9 +66,9 @@ struct malloc_object {
|
|||
void* object;
|
||||
struct malloc_object *next;
|
||||
};
|
||||
struct malloc_object *first = NULL, *last = NULL;
|
||||
static struct malloc_object *first = NULL, *last = NULL;
|
||||
|
||||
void skin_free_malloced(void)
|
||||
static void skin_free_malloced(void)
|
||||
{
|
||||
struct malloc_object *obj = first, *this;
|
||||
while (obj)
|
||||
|
@ -116,6 +116,7 @@ void* skin_buffer_alloc(size_t size)
|
|||
first = last = obj;
|
||||
else
|
||||
last->next = obj;
|
||||
last = obj;
|
||||
retval = obj->object;
|
||||
#else
|
||||
retval = malloc(size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue