lib/syslinux_parse: Add missing alloc check.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:40:42 +01:00
parent 21f22c7107
commit aa64393144

View 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)))
{