diff options
author | Qing Huang <qing.huang@intel.com> | 2010-08-13 03:34:18 +0000 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-04-06 23:22:43 -0700 |
commit | 35053df36a6addced6d009addf985596719508f4 (patch) | |
tree | 7e35b3557dfc38e109eb8277078a26db7849c431 | |
parent | 4b9576aac0ac0ca201afb82faa0aa7ec84ca7b8a (diff) | |
download | edk2-35053df36a6addced6d009addf985596719508f4.tar.gz edk2-35053df36a6addced6d009addf985596719508f4.tar.bz2 edk2-35053df36a6addced6d009addf985596719508f4.zip |
Add some NULL pointer check by using ASSERT()
(based on FatPkg commit a60a7af0891419330e0080f23fd2586ec871f021)
[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>
-rw-r--r-- | FatPkg/EnhancedFatDxe/DirectoryManage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FatPkg/EnhancedFatDxe/DirectoryManage.c b/FatPkg/EnhancedFatDxe/DirectoryManage.c index 2e1e0039a1..cae6718734 100644 --- a/FatPkg/EnhancedFatDxe/DirectoryManage.c +++ b/FatPkg/EnhancedFatDxe/DirectoryManage.c @@ -1185,6 +1185,7 @@ Returns: FAT_ODIR *ODir;
EFI_STATUS Status;
+ ASSERT (OFile != NULL);
ODir = OFile->ODir;
ASSERT (ODir != NULL);
DirEnt = AllocateZeroPool (sizeof (FAT_DIRENT));
@@ -1376,8 +1377,8 @@ Returns: FAT_VOLUME *Volume;
OFile = DirEnt->OFile;
- Volume = OFile->Volume;
ASSERT (OFile != NULL);
+ Volume = OFile->Volume;
if (OFile->ODir != NULL) {
FatDiscardODir (OFile);
|