summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2018-11-03 08:58:28 +0300
committerJian J Wang <jian.j.wang@intel.com>2018-11-07 18:08:26 +0300
commit8a7ff892ca067ff75ea41a18f703ef558956c669 (patch)
tree86182384ab2a8edc9d6f02cd0cad426e16a3e53b /MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c
parentd98fc9adfb6f4d0da5556c4a3592f01fb8731b24 (diff)
downloadedk2-8a7ff892ca067ff75ea41a18f703ef558956c669.tar.xz
MdeModulePkg/Core: fill logic hole in MemoryProtectionCpuArchProtocolNotify
At the end of of MemoryProtectionCpuArchProtocolNotify there's cleanup code to free resource. But at line 978, 994, 1005 the function returns directly. This patch use "goto" to replace "return" to make sure the resource is freed before exit. 1029: CoreCloseEvent (Event); 1030: return; There's another memory leak after calling gBS->LocateHandleBuffer() in the same function: Status = gBS->LocateHandleBuffer ( ByProtocol, &gEfiLoadedImageProtocolGuid, NULL, &NoHandles, &HandleBuffer ); HandleBuffer is allocated in above call but never freed. This patch will also add code to free it. Cc: Star Zeng <star.zeng@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c')
0 files changed, 0 insertions, 0 deletions