From b84cac2a36828b701a3f8125b8f9e4f9a2db0dc0 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Tue, 27 Apr 2010 20:59:45 +0530 Subject: [PATCH] undo some hunks that were removed by mistake --- kern/emu/mm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kern/emu/mm.c b/kern/emu/mm.c index 803c1c9aa..0e9e9f3a8 100644 --- a/kern/emu/mm.c +++ b/kern/emu/mm.c @@ -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; }