summaryrefslogtreecommitdiffstats
path: root/FatPkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2012-12-24 02:42:01 +0000
committerJordan Justen <jordan.l.justen@intel.com>2016-04-06 23:22:43 -0700
commitf4500fc17952c367d21d89defa9cd72b956e6637 (patch)
tree13b22c8254c09600e87a71b07a057ff9034a73f9 /FatPkg
parent68ce9995fadf37bf4eec05495d28e3af4ee00387 (diff)
downloadedk2-f4500fc17952c367d21d89defa9cd72b956e6637.tar.gz
edk2-f4500fc17952c367d21d89defa9cd72b956e6637.tar.bz2
edk2-f4500fc17952c367d21d89defa9cd72b956e6637.zip
Zero out CacheBuffer in FatInitializeDiskCache after allocated.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> (based on FatPkg commit b67d81497c36565dba57c7cac308b2f47668a60e) [jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Mark Doran <mark.doran@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'FatPkg')
-rw-r--r--FatPkg/EnhancedFatDxe/DiskCache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/FatPkg/EnhancedFatDxe/DiskCache.c b/FatPkg/EnhancedFatDxe/DiskCache.c
index 55a7c67be5..9f527289a8 100644
--- a/FatPkg/EnhancedFatDxe/DiskCache.c
+++ b/FatPkg/EnhancedFatDxe/DiskCache.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -529,7 +529,7 @@ Returns:
//
// Allocate the Fat Cache buffer
//
- CacheBuffer = AllocatePool (FatCacheSize + DataCacheSize);
+ CacheBuffer = AllocateZeroPool (FatCacheSize + DataCacheSize);
if (CacheBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}