xnu: Add missing error check.

Found by: Coveriy scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:44:57 +01:00
parent e12c3bed90
commit a05a6e6f92

View file

@ -1378,6 +1378,8 @@ grub_xnu_fill_devicetree (void)
name[len] = 0; name[len] = 0;
curvalue = grub_xnu_create_value (curkey, name); curvalue = grub_xnu_create_value (curkey, name);
if (!curvalue)
return grub_errno;
grub_free (name); grub_free (name);
data = grub_malloc (grub_strlen (var->value) + 1); data = grub_malloc (grub_strlen (var->value) + 1);