Clean up the gBS sevice (CopyMem, SetMem, AllocatePool, FreePool) with the corresponding APIs defined in Mde library class for these modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2456 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -132,7 +132,7 @@ ReallocatePool (
|
||||
CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
|
||||
}
|
||||
|
||||
gBS->FreePool (OldPool);
|
||||
FreePool (OldPool);
|
||||
}
|
||||
|
||||
return NewPool;
|
||||
@ -196,7 +196,7 @@ CatPrint (
|
||||
Str->Len = Size - sizeof (UINT16);
|
||||
}
|
||||
|
||||
gBS->FreePool (AppendStr);
|
||||
FreePool (AppendStr);
|
||||
return Str->Str;
|
||||
}
|
||||
|
||||
@ -1488,7 +1488,7 @@ ConvertDevicePathToText (
|
||||
//
|
||||
// Shrink pool used for string allocation
|
||||
//
|
||||
gBS->FreePool (UnpackDevPath);
|
||||
FreePool (UnpackDevPath);
|
||||
|
||||
NewSize = (Str.Len + 1) * sizeof (CHAR16);
|
||||
Str.Str = ReallocatePool (Str.Str, NewSize, NewSize);
|
||||
|
Reference in New Issue
Block a user