From 46c34eb09619a9f3d2517c29f17c2fca91c2e774 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Feb 2012 14:07:53 +0100 Subject: [PATCH] * util/grub-setup.c (setup) [!__linux__]: Add missing file declaration and grub_file_close call. --- ChangeLog | 5 +++++ util/grub-setup.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51ea4d5dd..3b6ceaaaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * util/grub-setup.c (setup) [!__linux__]: Add missing file declaration + and grub_file_close call. + 2012-02-29 Vladimir Serbinenko Add LZSS Mach-O support (needed for new xnu kernelcache). diff --git a/util/grub-setup.c b/util/grub-setup.c index 300994cc9..c2a4335e0 100644 --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -799,6 +799,7 @@ unable_to_embed: } #else { + grub_file_t file; /* Now read the core image to determine where the sectors are. */ grub_file_filter_disable_compression (); file = grub_file_open (core_path_dev); @@ -815,6 +816,7 @@ unable_to_embed: if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE) != (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE) grub_util_error ("%s", _("failed to read the rest sectors of the core image")); + grub_file_close (file); } #endif