summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2009-08-16 20:29:38 +0000
committerMagnus Holmgren <magnushol@gmail.com>2009-08-16 20:29:38 +0000
commitaaf37656692f57f3b1ce231053c9f2d15d1bea46 (patch)
treea4d455d7163ebdddf0e67b084934fd5157690caa
parentc4266283f6afeda25b6437044a17816112ab72f1 (diff)
downloadrockbox-aaf37656692f57f3b1ce231053c9f2d15d1bea46.tar.gz
rockbox-aaf37656692f57f3b1ce231053c9f2d15d1bea46.tar.bz2
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.c3
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)
}
}
- ptr_aux = malloc_ex(new_size, mem_pool);
+ if (!(ptr_aux = malloc_ex(new_size, mem_pool)))
+ return NULL;
cpsize = ((b->size & BLOCK_SIZE) > new_size) ? new_size : (b->size & BLOCK_SIZE);