summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index c055db2..4bd84c4 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -185,7 +185,11 @@ SyslogLocateSnp (
Snp = NULL;
}
- FreePool (Handles);
+ //
+ // Handles is allocated by gBS AllocatePool() service.
+ // So, gBS FreePool() service is used to free Handles.
+ //
+ gBS->FreePool (Handles);
return Snp;
}
@@ -1638,7 +1642,11 @@ NetGetChildHandle (
// Found item matched gEfiNicIp4ConfigVariableGuid
//
*ChildHandle = Handles[Index];
- FreePool (Handles);
+ //
+ // Handles is allocated by gBS AllocatePool() service.
+ // So, gBS FreePool() service is used to free Handles.
+ //
+ gBS->FreePool (Handles);
return EFI_SUCCESS;
}
}
@@ -1647,7 +1655,11 @@ NetGetChildHandle (
}
}
- FreePool (Handles);
+ //
+ // Handles is allocated by gBS AllocatePool() service.
+ // So, gBS FreePool() service is used to free Handles.
+ //
+ gBS->FreePool (Handles);
return Status;
}