diff options
author | Star Zeng <star.zeng@intel.com> | 2017-06-23 17:44:12 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-06-26 13:17:16 +0800 |
commit | 4777032247fb3cbc8325881572aa8a83ccd9db93 (patch) | |
tree | 75864b444955b810ea7dbfd38b0f77ff56f89199 /CorebootModulePkg | |
parent | 45cfcd8dccf84b8abbc1d6f587fedb5d2037ec79 (diff) | |
download | edk2-4777032247fb3cbc8325881572aa8a83ccd9db93.tar.gz edk2-4777032247fb3cbc8325881572aa8a83ccd9db93.tar.bz2 edk2-4777032247fb3cbc8325881572aa8a83ccd9db93.zip |
MdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULL
There is a case that ExtractGuidedSectionGetInfo return 0 for
ScratchBufferSize and ScratchBuffer will be NULL, after AllocatePool
fails to allocate buffer for AllocatedOutputBuffer, the code will
call FreePool (ScratchBuffer), but ScratchBuffer == NULL.
This patch is to only free ScratchBuffer when it is not NULL.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'CorebootModulePkg')
0 files changed, 0 insertions, 0 deletions