diff --git a/Ext4Pkg/Ext4Dxe/Directory.c b/Ext4Pkg/Ext4Dxe/Directory.c index ff476c8641..efdce14772 100644 --- a/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Ext4Pkg/Ext4Dxe/Directory.c @@ -260,7 +260,8 @@ Ext4OpenDirent ( } else { File->Dentry = Ext4CreateDentry (FileName, Directory->Dentry); - if (!File->Dentry) { + if (File->Dentry == NULL) { + Status = EFI_OUT_OF_RESOURCES; goto Error; } }