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

grub-core/lib/syslinux_parse.c

index 1927c4fdab2987cab76d5d5e977acce9fc346f91..f6053267f813b761947bf6696eef4870344174b2 100644 (file)
@@ -846,7 +846,12 @@ write_entry (struct output_buffer *outbuf,
 {
   grub_err_t err;
   if (curentry->comments)
-    print (outbuf, curentry->comments, grub_strlen (curentry->comments));
+    {
+      err = print (outbuf, curentry->comments,
+                  grub_strlen (curentry->comments));
+      if (err)
+       return err;
+    }
   {
     struct syslinux_say *say;
     for (say = curentry->say; say && say->next; say = say->next);