[Skiboot] [PATCH] mambo: Add NULL checks and error messages

Andrew Donnellan andrew.donnellan at au1.ibm.com
Mon Jul 11 14:25:01 AEST 2016


On 11/07/16 14:17, Alastair D'Silva wrote:
> My bad, this is permitted in glibc (not necessarily others).

skiboot, of course, implements its own malloc/free :) See 
core/{malloc,mem_region}.c, which (I checked!) define free(NULL) 
appropriately.

(curious which other C libraries have different behaviour... POSIX 
defines free(NULL) as a no-op.)

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list