]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
lib/syslinux_parse: Add missing alloc check.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 26 Jan 2015 08:40:42 +0000 (09:40 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 26 Jan 2015 08:40:42 +0000 (09:40 +0100)
Found by: Coverity scan.

grub-core/lib/syslinux_parse.c

index 241cefe693895a4bd8f4d5cfa1ddc32dee78b5ea..2f1f1a5a2b22b288ae5129577b44d13afa93ae51 100644 (file)
@@ -649,6 +649,8 @@ helptext (const char *line, grub_file_t file, struct syslinux_menu *menu)
   grub_size_t helplen, alloclen = 0;
 
   help = grub_strdup (line);
+  if (!help)
+    return grub_errno;
   helplen = grub_strlen (line);
   while ((grub_free (buf), buf = grub_file_getline (file)))
     {