grub2/0211-commands-fileXX-Fix-remaining-memory-leak.patch
Peter Jones 8c6b1ac71e Reconcile with upstream once again.
Also include some minor fixes for gcc 5.1.1

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-07-22 09:46:32 -04:00

27 lines
881 B
Diff

From fb66b512fa241c98b44ce6032e1d285d9d9f9aa3 Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <arvidjaar@gmail.com>
Date: Sun, 25 Jan 2015 16:36:30 +0300
Subject: [PATCH 211/506] commands/fileXX: Fix remaining memory leak.
Found by: Coverity Scan.
---
grub-core/commands/fileXX.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/commands/fileXX.c b/grub-core/commands/fileXX.c
index 7743f3e..c17d26c 100644
--- a/grub-core/commands/fileXX.c
+++ b/grub-core/commands/fileXX.c
@@ -54,7 +54,7 @@ grub_file_check_netbsdXX (grub_elf_t elf)
char name[sizeof(".note.netbsd.ident")];
grub_memset (name, 0, sizeof (name));
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))
{
--
2.4.3