projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dlmalloc: ensure gd is set for early alloc
[oweals/u-boot.git]
/
common
/
dlmalloc.c
diff --git
a/common/dlmalloc.c
b/common/dlmalloc.c
index f9873393c183350795ed3ac7c15f5552afb5419b..d87834df67f4f94d6f71951be8880e80a28fb904 100644
(file)
--- a/
common/dlmalloc.c
+++ b/
common/dlmalloc.c
@@
-2181,7
+2181,7
@@
Void_t* mALLOc(bytes) size_t bytes;
INTERNAL_SIZE_T nb;
#ifdef CONFIG_SYS_MALLOC_F_LEN
- if (!(gd->flags & GD_FLG_RELOC)) {
+ if (
gd &&
!(gd->flags & GD_FLG_RELOC)) {
ulong new_ptr;
void *ptr;