diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-13 16:50:35 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-13 17:06:17 +0200 |
commit | 7ffced92a7b6e5a0eb4433123b3973c635da7355 (patch) | |
tree | 83f27ced9a833564f4a5e62191cbe626b1b646d6 /OvmfPkg | |
parent | 28f8d28faabf50a82ef8d137308592c64ea9e2b6 (diff) | |
download | edk2-platforms-7ffced92a7b6e5a0eb4433123b3973c635da7355.tar.xz |
OvmfPkg/PlatformPei: add missing auto variable initialization
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/PlatformPei/Xen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c index 3a4358251e..223908a4f5 100644 --- a/OvmfPkg/PlatformPei/Xen.c +++ b/OvmfPkg/PlatformPei/Xen.c @@ -171,6 +171,7 @@ XenPublishRamRegions ( //
// Parse RAM in E820 map
//
+ E820EntriesCount = 0;
Status = XenGetE820Map (&E820Map, &E820EntriesCount);
ASSERT_EFI_ERROR (Status);
|