Skip to content
Commit b6570261 authored by Nicola Mazzucato's avatar Nicola Mazzucato Committed by jimqui01
Browse files

fwk_mm: Restore trap on allocation failure



The recent change to the standard library memory allocator has removed the
trapping mechanism that prevented the function to return a NULL pointer.
As some callers make the assumption that the pointer returned is always !NULL,
this may cause a NULL pointer dereference.

Reintroduce the trapping instead of returning a NULL pointer.

Furthermore, add a new fwk_mm_alloc_notrap() function to be used specifically
by fwk_io_vprintf() which handles the case for a null pointer.

Change-Id: I1e2b77a3cd6ea31a9c97c2d4752ad6b63302b43a
Signed-off-by: Nicola Mazzucato's avatarNicola Mazzucato <nicola.mazzucato@arm.com>
parent 2c9aa68c
Loading
Loading
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