mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
NetworkPkg: Ip4Dxe/Ip6Dxe: Set SB notify to NULL after event close
Ip4StartAutoConfig() and Ip6ConfigStartStatefulAutoConfig() close the DHCP service binding notify event when the service child is successfully created, but do not NULL the instance field afterward. On re-entry, the stale handle passes the non-NULL condition and is closed a second time, which results in a page fault with memory protections enabled. This change sets the event field to NULL immediately after CloseEvent() so that subsequent calls skip attempting to close the event again. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
parent
6e39689c65
commit
e1103f7dca
2 changed files with 2 additions and 0 deletions
|
|
@ -935,6 +935,7 @@ Ip4StartAutoConfig (
|
|||
|
||||
if (Instance->Dhcp4SbNotifyEvent != NULL) {
|
||||
gBS->CloseEvent (Instance->Dhcp4SbNotifyEvent);
|
||||
Instance->Dhcp4SbNotifyEvent = NULL;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ Ip6ConfigStartStatefulAutoConfig (
|
|||
|
||||
if (Instance->Dhcp6SbNotifyEvent != NULL) {
|
||||
gBS->CloseEvent (Instance->Dhcp6SbNotifyEvent);
|
||||
Instance->Dhcp6SbNotifyEvent = NULL;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue