// Currently only support BMP format.\r
//\r
if (Format != EfiBadgingFormatBMP) {\r
- SafeFreePool (ImageData);\r
+ if (ImageData != NULL) {\r
+ FreePool (ImageData);\r
+ }\r
continue;\r
}\r
} else {\r
&Width\r
);\r
if (EFI_ERROR (Status)) {\r
- SafeFreePool (ImageData);\r
+ if (ImageData != NULL) {\r
+ FreePool (ImageData);\r
+ }\r
if (Badging == NULL) {\r
return Status;\r
} else {\r
}\r
}\r
\r
- SafeFreePool (ImageData);\r
- SafeFreePool (Blt);\r
+ if (ImageData != NULL) {\r
+ FreePool (ImageData);\r
+ }\r
+ if (Blt != NULL) {\r
+ FreePool (Blt);\r
+ }\r
\r
if (Badging == NULL) {\r
break;\r
\r
Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
if (Blt->Image.Bitmap == NULL) {\r
- SafeFreePool (Blt);\r
- SafeFreePool (Buffer);\r
+ FreePool (Blt);\r
+ FreePool (Buffer);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
);\r
}\r
\r
- SafeFreePool (RowInfoArray);\r
- SafeFreePool (Blt->Image.Bitmap);\r
+ if (RowInfoArray != NULL) {\r
+ FreePool (RowInfoArray);\r
+ }\r
+ if (Blt->Image.Bitmap != NULL) {\r
+ FreePool (Blt->Image.Bitmap);\r
+ }\r
} else {\r
Status = EFI_UNSUPPORTED;\r
}\r
\r
Error:\r
- SafeFreePool (Blt);\r
- SafeFreePool (FontInfo);\r
+ if (Blt != NULL) {\r
+ FreePool (Blt);\r
+ }\r
+ if (FontInfo != NULL) { \r
+ FreePool (FontInfo);\r
+ }\r
FreePool (Buffer);\r
\r
if (EFI_ERROR (Status)) {\r