* grub-core/fs/reiserfs.c (grub_reiserfs_iterate_dir): Fix size byteswap

with old reiserfs.
	(grub_reiserfs_open): Don't free root.
This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2012-05-22 08:30:57 +02:00
1 parent 021d90ecac
commit 937d1c44b1
2 files changed
+9 -2

No files matched your search

+3 -2
View File
@@ -884,7 +884,7 @@ grub_reiserfs_iterate_dir (grub_fshelp_node_t item,
entry_type = GRUB_FSHELP_SYMLINK;
else
entry_type = GRUB_FSHELP_REG;
entry_item->size = (grub_off_t) grub_le_to_cpu64 (entry_v1_stat.size);
entry_item->size = (grub_off_t) grub_le_to_cpu32 (entry_v1_stat.size);
}
else
{
@@ -1028,7 +1028,8 @@ grub_reiserfs_open (struct grub_file *file, const char *name)
fail:
assert (grub_errno != GRUB_ERR_NONE);
grub_free (found);
if (found != &root)
grub_free (found);
grub_free (data);
grub_dl_unref (my_mod);
return grub_errno;