]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
xnu: Add missing error check.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 26 Jan 2015 08:44:57 +0000 (09:44 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 26 Jan 2015 08:45:55 +0000 (09:45 +0100)
Found by: Coveriy scan.

grub-core/loader/xnu.c

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