MdeModulePkg: Enhance error handling in NetLibGetMacAddress() of DxeNetLib.

Signed-off-by: xdu2
Reviewed-by: vanjeff

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12572 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2 2011-10-26 06:52:02 +00:00
parent 042a73f51b
commit e20d6513ed
1 changed files with 2 additions and 0 deletions

View File

@ -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;