diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-30 08:00:56 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-10-30 08:00:56 +0000 |
commit | 7001eaf8e5c94dc03446d6edba3d523060b6a346 (patch) | |
tree | dfc8deeb1ef93f691d79a629f0755f35a5ac846a /EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c | |
parent | 676df92c2c0c5bdeb0f8e27349f5dd467928ce09 (diff) | |
download | edk2-platforms-7001eaf8e5c94dc03446d6edba3d523060b6a346.tar.xz |
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its implementation only check if a pointer is NULL. If a garbage pointer is passed in, the gBS->FreePool will still ASSERT in debug build and return error code.
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@6307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c')
-rw-r--r-- | EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c index 0955d7faff..0e4125450f 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/ConfigAccess.c @@ -508,7 +508,9 @@ ThunkExtractConfig ( );
}
- SafeFreePool (Data);
+ if (Data != NULL) {
+ FreePool (Data);
+ }
return Status;
}
|