diff options
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c b/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c index 45ef9ff5f2..413e47e923 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c @@ -396,6 +396,10 @@ void *realloc (void *ptr, size_t size) UINTN StartPageIndex;
UINTN PageCount;
+ if (ptr == NULL) {
+ return malloc (size);
+ }
+
//
// Get Original Size of ptr
//
|