The test has been ignoring potential failures in memory allocations, giving misleading error messages. Add a simple check and return early if the allocation failed. Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>