@retval A string representation of the type allocated from BS Pool.\r
**/\r
CHAR16*\r
-EFIAPI\r
ConvertMemoryType (\r
IN CONST EFI_MEMORY_TYPE Memory\r
)\r
@retval A string representation of the type allocated from BS Pool.\r
**/\r
CHAR16*\r
-EFIAPI\r
ConvertPixelFormat (\r
IN CONST EFI_GRAPHICS_PIXEL_FORMAT Fmt\r
)\r
@return The node.\r
**/\r
CONST GUID_INFO_BLOCK *\r
-EFIAPI\r
InternalShellGetNodeFromGuid(\r
IN CONST EFI_GUID* Guid\r
)\r
@retval EFI_INVALID_PARAMETER Guid NameId was invalid\r
**/\r
EFI_STATUS\r
-EFIAPI\r
InsertNewGuidNameMapping(\r
IN CONST EFI_GUID *Guid,\r
IN CONST EFI_STRING_ID NameID,\r
@retval EFI_SUCCESS The operation was successful.\r
**/\r
EFI_STATUS\r
-EFIAPI\r
InternalShellInitHandleList(\r
VOID\r
)\r
\r
FreePool (DriverBindingHandleBuffer);\r
\r
+ if (MatchingHandleBuffer == NULL || *MatchingHandleCount == 0) {\r
+ //\r
+ // The caller is not interested in the actual handles, or we've found none.\r
+ //\r
+ FreePool (HandleBufferForReturn);\r
+ HandleBufferForReturn = NULL;\r
+ }\r
+\r
if (MatchingHandleBuffer != NULL) {\r
*MatchingHandleBuffer = HandleBufferForReturn;\r
- } else {\r
- FreePool(HandleBufferForReturn);\r
}\r
+\r
ASSERT ((MatchingHandleBuffer == NULL) ||\r
(*MatchingHandleCount == 0 && *MatchingHandleBuffer == NULL) ||\r
(*MatchingHandleCount != 0 && *MatchingHandleBuffer != NULL));\r
@return A pointer to (*DestinationBuffer).\r
**/\r
VOID*\r
-EFIAPI\r
BuffernCatGrow (\r
IN OUT VOID **DestinationBuffer,\r
IN OUT UINTN *DestinationSize,\r