Skip to content
Snippets Groups Projects
Commit 2c857170 authored by Hans de Goede's avatar Hans de Goede Committed by Simon Glass
Browse files

malloc_simple: Return NULL on malloc failure rather then calling panic()

All callers of malloc should already do error checking, and may even be able
to continue without the alloc succeeding.

Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
common/built-in.o when building the SPL, triggering this gcc bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303



Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
using malloc_simple in the first place.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent a3e757a5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment