mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
NetworkPkg/HttpBootDxe: Add check to avoid use NULL pointer
Cc: Wu Hao A <hao.a.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
76fd5a660d
commit
770f9aae09
@ -615,6 +615,7 @@ HttpBootIp4DxeDriverBindingStart (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
if (Private != NULL) {
|
||||||
if (FirstStart) {
|
if (FirstStart) {
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
@ -626,9 +627,10 @@ ON_ERROR:
|
|||||||
HttpBootDestroyIp4Children (This, Private);
|
HttpBootDestroyIp4Children (This, Private);
|
||||||
HttpBootConfigFormUnload (Private);
|
HttpBootConfigFormUnload (Private);
|
||||||
|
|
||||||
if (FirstStart && Private != NULL) {
|
if (FirstStart) {
|
||||||
FreePool (Private);
|
FreePool (Private);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -1144,6 +1146,7 @@ HttpBootIp6DxeDriverBindingStart (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
ON_ERROR:
|
ON_ERROR:
|
||||||
|
if (Private != NULL) {
|
||||||
if (FirstStart) {
|
if (FirstStart) {
|
||||||
gBS->UninstallProtocolInterface (
|
gBS->UninstallProtocolInterface (
|
||||||
ControllerHandle,
|
ControllerHandle,
|
||||||
@ -1155,9 +1158,10 @@ ON_ERROR:
|
|||||||
HttpBootDestroyIp6Children(This, Private);
|
HttpBootDestroyIp6Children(This, Private);
|
||||||
HttpBootConfigFormUnload (Private);
|
HttpBootConfigFormUnload (Private);
|
||||||
|
|
||||||
if (FirstStart && Private != NULL) {
|
if (FirstStart) {
|
||||||
FreePool (Private);
|
FreePool (Private);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user