* 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 2012-05-22 08:30:57 +02:00
parent 021d90ecac
commit 937d1c44b1
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2012-05-22 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/reiserfs.c (grub_reiserfs_iterate_dir): Fix size byteswap
with old reiserfs.
(grub_reiserfs_open): Don't free root.
2012-05-22 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Set currnode to 0

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;