boot1.efi Free() should check for NULL to provide consistent behavior

with libstand Free().

Reviewed by:	imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D7497
This commit is contained in:
Toomas Soome 2016-08-17 21:29:57 +00:00
parent 627ea1e104
commit 88fb7b56ea

View File

@ -78,7 +78,8 @@ Malloc(size_t len, const char *file __unused, int line __unused)
void
Free(void *buf, const char *file __unused, int line __unused)
{
(void)bs->FreePool(buf);
if (buf != NULL)
(void)bs->FreePool(buf);
}
/*