diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-01-19 09:12:48 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-01-19 09:12:48 +0900 |
commit | b097d552bc9ee0351bb0c3d1219856e845df59f9 (patch) | |
tree | 3b2b8391ec989d9a8b561ce8234dde3b1d481880 /common/dlmalloc.c | |
parent | e598dfc22c8789991d165714bec53b2390fc999d (diff) | |
parent | a7709d926dbc7cb1541034fcf2b21ce3e838cb12 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r-- | common/dlmalloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 735b3443e63..205fc40ac83 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2179,6 +2179,12 @@ Void_t* mALLOc(bytes) size_t bytes; INTERNAL_SIZE_T nb; + /* check if mem_malloc_init() was run */ + if ((mem_malloc_start == 0) && (mem_malloc_end == 0)) { + /* not initialized yet */ + return 0; + } + if ((long)bytes < 0) return 0; nb = request2size(bytes); /* padded request size; */ |