]> git.proxmox.com Git - grub2.git/commitdiff
undo some hunks that were removed by mistake
authorBVK Chaitanya <bvk.groups@gmail.com>
Tue, 27 Apr 2010 15:29:45 +0000 (20:59 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Tue, 27 Apr 2010 15:29:45 +0000 (20:59 +0530)
kern/emu/mm.c

index 803c1c9aaddd217b8f2d6e455dd369684a4df7f2..0e9e9f3a835219f090f3612f82e70f3691b5171d 100644 (file)
@@ -55,6 +55,8 @@ grub_realloc (void *ptr, grub_size_t size)
 {
   void *ret;
   ret = realloc (ptr, size);
+  if (!ret)
+    grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
   return ret;
 }
 
@@ -76,5 +78,8 @@ grub_memalign (grub_size_t align, grub_size_t size)
   grub_util_error ("grub_memalign is not supported");
 #endif
 
+  if (!p)
+    grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
+
   return p;
 }