diff options
| author | Gary Lin <glin@suse.com> | 2016-03-17 15:07:04 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2016-09-06 15:05:36 -0400 |
| commit | 7b9281af14930040ec6cb333de2d64e0ff91cf3c (patch) | |
| tree | 5aac021d808feaf82230421578b958f7ddcb5a2d /Cryptlib/SysCall/BaseMemAllocation.c | |
| parent | e769628e0d23cf4e3da71cae4b38c5d274d090e0 (diff) | |
| download | efi-boot-shim-7b9281af14930040ec6cb333de2d64e0ff91cf3c.tar.gz efi-boot-shim-7b9281af14930040ec6cb333de2d64e0ff91cf3c.zip | |
Update the CryptLib
Update to the edk2 commit 5e2318dd37a51948aaf845c7d920b11f47cdcfe6
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/SysCall/BaseMemAllocation.c')
| -rw-r--r-- | Cryptlib/SysCall/BaseMemAllocation.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Cryptlib/SysCall/BaseMemAllocation.c b/Cryptlib/SysCall/BaseMemAllocation.c index 75da1dd2..792b29e8 100644 --- a/Cryptlib/SysCall/BaseMemAllocation.c +++ b/Cryptlib/SysCall/BaseMemAllocation.c @@ -38,5 +38,11 @@ void *realloc (void *ptr, size_t size) /* De-allocates or frees a memory block */
void free (void *ptr)
{
- FreePool (ptr);
+ //
+ // In Standard C, free() handles a null pointer argument transparently. This
+ // is not true of FreePool() below, so protect it.
+ //
+ if (ptr != NULL) {
+ FreePool (ptr);
+ }
}
|
