From 7a2505bb0f64a266002737ea8446f14cc4095a22 Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Wed, 9 Oct 2019 14:28:50 +0800 Subject: [PATCH] MdeModulePkg/EhciPei: Initialize the variable Map Map is used but not Initialized. Map is called by IoMmuMap, in which Mapping(Map) is called by IoMmu->Map. We can not assume Map is given an initial value at any step. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Shenglei Zhang Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c index 7c6a6a5f97..995ccd2463 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -534,6 +534,8 @@ EhcCreateUrb ( PEI_URB *Urb; VOID *Map; + Map = NULL; + Urb = Ehc->Urb; Urb->Signature = EHC_URB_SIG; InitializeListHead (&Urb->UrbList); -- 2.39.2