]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
CryptoPkg: Fix typos in comments
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / SysCall / RuntimeMemAllocation.c
index 45ef9ff5f2525a48f7dbf8c7e52202cc09a1dbdd..19c30dc66d055695a93cefe2e58459827bfd272f 100644 (file)
@@ -2,7 +2,7 @@
   Light-weight Memory Management Routines for OpenSSL-based Crypto\r
   Library at Runtime Phase.\r
 \r
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -204,7 +204,7 @@ LookupFreeMemRegion (
   }\r
 \r
   //\r
-  // No availabe region for object allocation!\r
+  // No available region for object allocation!\r
   //\r
   return (UINTN)(-1);\r
 }\r
@@ -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