mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
NetworkPkg: Fix a memory leak in HTTP boot driver.
We always need to call EfiBootManagerFreeLoadOption because the memory allocated for NewOption (description and device path) is no longer needed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
parent
2d6a7af90f
commit
a1522257a9
@ -142,9 +142,7 @@ HttpBootAddBootOption (
|
||||
}
|
||||
|
||||
Status = EfiBootManagerAddLoadOptionVariable (&NewOption, (UINTN) -1);
|
||||
if (EFI_ERROR (Status)) {
|
||||
EfiBootManagerFreeLoadOption (&NewOption);
|
||||
}
|
||||
EfiBootManagerFreeLoadOption (&NewOption);
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user