diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2009-08-16 20:29:38 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2009-08-16 20:29:38 +0000 |
commit | aaf37656692f57f3b1ce231053c9f2d15d1bea46 (patch) | |
tree | a4d455d7163ebdddf0e67b084934fd5157690caa | |
parent | c4266283f6afeda25b6437044a17816112ab72f1 (diff) | |
download | rockbox-aaf37656692f57f3b1ce231053c9f2d15d1bea46.tar.gz rockbox-aaf37656692f57f3b1ce231053c9f2d15d1bea46.zip |
Fix realloc bug in TLSF.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22355 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c b/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c index 35bdc70290..830184761a 100644 --- a/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c +++ b/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c | |||
@@ -861,7 +861,8 @@ void *realloc_ex(void *ptr, size_t new_size, void *mem_pool) | |||
861 | } | 861 | } |
862 | } | 862 | } |
863 | 863 | ||
864 | ptr_aux = malloc_ex(new_size, mem_pool); | 864 | if (!(ptr_aux = malloc_ex(new_size, mem_pool))) |
865 | return NULL; | ||
865 | 866 | ||
866 | cpsize = ((b->size & BLOCK_SIZE) > new_size) ? new_size : (b->size & BLOCK_SIZE); | 867 | cpsize = ((b->size & BLOCK_SIZE) > new_size) ? new_size : (b->size & BLOCK_SIZE); |
867 | 868 | ||