mirror of https://github.com/acidanthera/audk.git
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);
|
||||
}
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
|
|
Loading…
Reference in New Issue