Correct return value check.
authorjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 5 Jan 2011 13:43:00 +0000 (13:43 +0000)
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 5 Jan 2011 13:43:00 +0000 (13:43 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11227 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c

index 530f765..9a4119b 100644 (file)
@@ -889,7 +889,7 @@ InitializeScriptSaveOnS3SaveState (
     // Allocate BootScriptThunkData\r
     //\r
     BootScriptThunkData = AllocatePool (sizeof (BOOT_SCRIPT_THUNK_DATA));\r
-    if (EFI_ERROR (Status)) {\r
+    if (BootScriptThunkData == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r