svn commit: r304317 - head/sys/boot/efi/boot1

Toomas Soome tsoome at FreeBSD.org
Wed Aug 17 21:29:59 UTC 2016


Author: tsoome
Date: Wed Aug 17 21:29:57 2016
New Revision: 304317
URL: https://svnweb.freebsd.org/changeset/base/304317

Log:
  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

Modified:
  head/sys/boot/efi/boot1/boot1.c

Modified: head/sys/boot/efi/boot1/boot1.c
==============================================================================
--- head/sys/boot/efi/boot1/boot1.c	Wed Aug 17 20:32:08 2016	(r304316)
+++ head/sys/boot/efi/boot1/boot1.c	Wed Aug 17 21:29:57 2016	(r304317)
@@ -78,7 +78,8 @@ Malloc(size_t len, const char *file __un
 void
 Free(void *buf, const char *file __unused, int line __unused)
 {
-	(void)bs->FreePool(buf);
+	if (buf != NULL)
+		(void)bs->FreePool(buf);
 }
 
 /*


More information about the svn-src-all mailing list