From 35053df36a6addced6d009addf985596719508f4 Mon Sep 17 00:00:00 2001 From: Qing Huang Date: Fri, 13 Aug 2010 03:34:18 +0000 Subject: 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 Acked-by: Mark Doran Acked-by: Laszlo Ersek --- FatPkg/EnhancedFatDxe/DirectoryManage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FatPkg') diff --git a/FatPkg/EnhancedFatDxe/DirectoryManage.c b/FatPkg/EnhancedFatDxe/DirectoryManage.c index 2e1e003..cae6718 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); -- cgit v1.1