summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKubacki, Michael A </o=Intel/ou=External (FYDIBOHF25SPDLT)/cn=Recipients/cn=3c8b0226e75f4ab08d20c151cb7a8a72>2019-11-22 07:02:36 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2019-11-25 14:14:18 +0000
commitbd85bf54c268204c7a698a96f3ccd96cd77952cd (patch)
treeeaa0b2a4425768bf64178c98718400e5cbfedcc4
parentbbb5b0d648d918c83f2f99b02e3446787dbe474f (diff)
MdeModulePkg/Variable: Initialize local variable "RtPtrTrack"edk2-stable201911
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2364 Fixes a new build warning in VS2012 introduced in f8ff4cca7c. This patch initializes the local variable "RtPtrTrack" in FindVariableInRuntimeCache (). This ensures the pointers in the structure are initialized in the case no variable stores exist in the list of variable stores. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index d525998ae3..2cf0ed32ae 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -590,6 +590,8 @@ FindVariableInRuntimeCache (
return EFI_INVALID_PARAMETER;
}
+ ZeroMem (&RtPtrTrack, sizeof (RtPtrTrack));
+
//
// The UEFI specification restricts Runtime Services callers from invoking the same or certain other Runtime Service
// functions prior to completion and return from a previous Runtime Service call. These restrictions prevent