]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformPei: add missing auto variable initialization
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Jul 2016 14:50:35 +0000 (16:50 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 13 Jul 2016 15:06:17 +0000 (17:06 +0200)
The E820EntriesCount variable in XenPublishRamRegions() may be
referenced without being initialized on RELEASE builds, since the
ASSERT that fires if the call to XenGetE820Map() fails is compiled
out in that case. So initialize it to 0.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/PlatformPei/Xen.c

index 3a4358251e3889e7f4ef8a1e97ee56948a342e4e..223908a4f529b2711609641db484a78677605471 100644 (file)
@@ -171,6 +171,7 @@ XenPublishRamRegions (
   //\r
   // Parse RAM in E820 map\r
   //\r
+  E820EntriesCount = 0;\r
   Status = XenGetE820Map (&E820Map, &E820EntriesCount);\r
 \r
   ASSERT_EFI_ERROR (Status);\r