]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devprop): Don't attempt
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 18:38:19 +0000 (20:38 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 18:38:19 +0000 (20:38 +0200)
to continue if allocation is failed.

Reported by: David Volgyes <dvolgyes>.

ChangeLog
grub-core/loader/i386/xnu.c

index ad72c8da212b8f2fbe8dfdb0eca0a5484e605587..66c55d101e182fe4f521890e3045d6bd6f1ad590 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devprop): Don't attempt
+       to continue if allocation is failed.
+
+       Reported by: David Volgyes <dvolgyes>.
+
 2011-06-23  David Volgyes <dvolgyes>
 
        * grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
index b877b0ea5ef76872b7563c6b5ca475c45fbd91df..6128ec384c55e35462d53ee97c7ecdaa075b6844 100644 (file)
@@ -452,11 +452,11 @@ grub_cpu_xnu_fill_devprop (void)
     }
 
   devprop = grub_xnu_create_value (&(efikey->first_child), "device-properties");
-  if (devprop)
-    {
-      devprop->data = grub_malloc (total_length);
-      devprop->datasize = total_length;
-    }
+  if (!devprop)
+    return grub_errno;
+
+  devprop->data = grub_malloc (total_length);
+  devprop->datasize = total_length;
 
   ptr = devprop->data;
   head = ptr;