summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/DxeNetLib/DxeNetLib.c')
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index dbd77e5bda..82322c98c8 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -2130,6 +2130,7 @@ NetLibGetMacAddress (
(VOID **) &Mnp
);
if (EFI_ERROR (Status)) {
+ MnpSb->DestroyChild (MnpSb, MnpChildHandle);
return Status;
}
@@ -2138,6 +2139,7 @@ NetLibGetMacAddress (
//
Status = Mnp->GetModeData (Mnp, NULL, &SnpModeData);
if (EFI_ERROR (Status)) {
+ MnpSb->DestroyChild (MnpSb, MnpChildHandle);
return Status;
}
SnpMode = &SnpModeData;