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 <nicola.mazzucato@arm.com>
Loading
Please register or sign in to comment