]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/DirectoryManage.c
Zero out CacheBuffer in FatInitializeDiskCache after allocated.
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / DirectoryManage.c
index f9a764d3aa52dd3b4154bb18dcc73e15fda34596..cae67187346903b10231643055d6c6d8f756ec19 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2005 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials are licensed and made available\r
+Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
 distribution. The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -1185,6 +1185,7 @@ Returns:
   FAT_ODIR    *ODir;\r
   EFI_STATUS  Status;\r
 \r
+  ASSERT (OFile != NULL);\r
   ODir = OFile->ODir;\r
   ASSERT (ODir != NULL);\r
   DirEnt = AllocateZeroPool (sizeof (FAT_DIRENT));\r
@@ -1376,8 +1377,8 @@ Returns:
   FAT_VOLUME  *Volume;\r
 \r
   OFile   = DirEnt->OFile;\r
-  Volume  = OFile->Volume;\r
   ASSERT (OFile != NULL);\r
+  Volume  = OFile->Volume;\r
 \r
   if (OFile->ODir != NULL) {\r
     FatDiscardODir (OFile);\r