diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-24 22:44:03 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-24 22:44:03 +0000 |
commit | 565b3c807ccb529b07c3b42ef00429aa4e19f882 (patch) | |
tree | d7495b704782f5e71111602c6b71c1473e8ef4e8 /StdLib/Include | |
parent | 76d6b68de87275e40e2d646a54b3f21334d63133 (diff) | |
download | edk2-platforms-565b3c807ccb529b07c3b42ef00429aa4e19f882.tar.xz |
StdLib/LibC/StdLib/Malloc.c: Make the free() function conform to the ISO/IEC 9899 (C95) specification.
The C95 specification states: "The free function causes the space pointed to by ptr to be deallocated, that is, made available for further allocation. If ptr is a null pointer, no action occurs". The UEFI FreePool() function, which the StdLib implementation of free() uses, does not make this check. This fix adds a check for null to the free() function such that if the pointer argument is NULL, nothing is done.
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: erik.c.bjorge@intel.com
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13739 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include')
0 files changed, 0 insertions, 0 deletions