It is recommended that module writer should keep track how a pointer is allocated and free it after use.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6305
6f19259b-4bc3-4df7-8a09-
765794883524
IN VOID *Buffer\r
);\r
\r
-/**\r
- Frees buffer that were previously allocated with one of the\r
- memory allocation functions in the Memory Allocation Library.\r
-\r
- @param Buffer Pointer to the buffer of pages\r
- to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
- IN VOID *Buffer\r
- );\r
-\r
#endif\r
}\r
\r
\r
-/**\r
- Frees buffer that were previously allocated with one of the\r
- memory allocation functions in the Memory Allocation Library.\r
-\r
- @param Buffer Pointer to the buffer of pages\r
- to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
- IN VOID *Buffer\r
- )\r
-{\r
- //\r
- // PEI phase does not support to free pool, so leave it as NOP.\r
- //\r
-}\r
-\r
ASSERT_EFI_ERROR (Status);\r
}\r
\r
-\r
-/**\r
- Frees buffer that were previously allocated with one of the\r
- memory allocation functions in the Memory Allocation Library.\r
-\r
- @param Buffer Pointer to the buffer of pages\r
- to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
- IN VOID *Buffer\r
- )\r
-{\r
- if (Buffer != NULL) {\r
- FreePool (Buffer);\r
- }\r
-}\r
-\r