Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2016 21:29:58 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304317 - head/sys/boot/efi/boot1
Message-ID:  <201608172129.u7HLTwn2025631@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608172129.u7HLTwn2025631>