commands/fileXX: Fix remaining memory leak.

Found by: Coverity Scan.
This commit is contained in:
Andrei Borzenkov 2015-01-25 16:36:30 +03:00
parent d0af2156c3
commit fb66b512fa

View file

@ -54,7 +54,7 @@ grub_file_check_netbsdXX (grub_elf_t elf)
char name[sizeof(".note.netbsd.ident")]; char name[sizeof(".note.netbsd.ident")];
grub_memset (name, 0, sizeof (name)); grub_memset (name, 0, sizeof (name));
if (grub_file_seek (elf->file, stroff + s->sh_name) == (grub_off_t) -1) if (grub_file_seek (elf->file, stroff + s->sh_name) == (grub_off_t) -1)
return grub_errno; goto fail;
if (grub_file_read (elf->file, name, sizeof (name)) != (grub_ssize_t) sizeof (name)) if (grub_file_read (elf->file, name, sizeof (name)) != (grub_ssize_t) sizeof (name))
{ {