]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
CryptoPkg: RuntimeCryptLib: support realloc(NULL, size)
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / SysCall / RuntimeMemAllocation.c
index 45ef9ff5f2525a48f7dbf8c7e52202cc09a1dbdd..413e47e9232542b1dfe9afde75fe869afee3d3d7 100644 (file)
@@ -396,6 +396,10 @@ void *realloc (void *ptr, size_t size)
   UINTN  StartPageIndex;\r
   UINTN  PageCount;\r
 \r
+  if (ptr == NULL) {\r
+    return malloc (size);\r
+  }\r
+\r
   //\r
   // Get Original Size of ptr\r
   //\r