diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-26 16:20:56 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-26 16:20:56 +0000 |
commit | 79bcf0554bd91975095b3c4acf9e0c6a8f447588 (patch) | |
tree | 0b128ba846d0d2cb717bd19ddb6bff37dee8cc71 | |
parent | 0433d8f0180a8dcc1c6faf9948193d96e174e574 (diff) | |
download | edk2-platforms-79bcf0554bd91975095b3c4acf9e0c6a8f447588.tar.xz |
Make sure gBS FreePool() is used to free the buffer always allocated by gBS AllocatePool() service.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10696 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index c055db2b77..4bd84c4de7 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;
}
|