mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +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);
|
Status = EfiBootManagerAddLoadOptionVariable (&NewOption, (UINTN) -1);
|
||||||
if (EFI_ERROR (Status)) {
|
EfiBootManagerFreeLoadOption (&NewOption);
|
||||||
EfiBootManagerFreeLoadOption (&NewOption);
|
|
||||||
}
|
|
||||||
|
|
||||||
ON_EXIT:
|
ON_EXIT:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user