]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/Mmu: Fix potential page table memory leak
authorHeyi Guo <heyi.guo@linaro.org>
Wed, 9 Sep 2015 13:37:50 +0000 (13:37 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Wed, 9 Sep 2015 13:37:50 +0000 (13:37 +0000)
commit8483681426b5a33e9d186758c47def0f1fcd86e2
tree49f96c6333807d7d68152af461fa8436eb9a00ae
parentedff645fe4d8a815618b41a9285e2da6ea7f1257
ArmPkg/Mmu: Fix potential page table memory leak

During page entry attribute update, if there are table entries
between starting BlockEntry and LastBlockEntry, table entries will be
set as block entries and the allocated memory of the tables will be
leaked.

So instead, we break the inner loop when we find a table entry and run
outer loop again to step into the table by the same logic.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
[ardb: move termination condition check inside the loop]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18425 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c