+2011-11-10 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/zfs/zfs.c (zfs_mount): Fix spurious warning.
+
2011-11-10 Vladimir Serbinenko <phcoder@gmail.com>
Fix ZFS memory and resource leaks.
{
struct grub_zfs_data *data = 0;
grub_err_t err;
- objset_phys_t *osp = 0;
+ void *osp = 0;
grub_size_t ospsize;
grub_zfs_endian_t ub_endian = GRUB_ZFS_UNKNOWN_ENDIAN;
uberblock_t *ub;
? GRUB_ZFS_LITTLE_ENDIAN : GRUB_ZFS_BIG_ENDIAN);
err = zio_read (&ub->ub_rootbp, ub_endian,
- (void **) &osp, &ospsize, data);
+ &osp, &ospsize, data);
if (err)
{
zfs_unmount (data);
}
/* Got the MOS. Save it at the memory addr MOS. */
- grub_memmove (&(data->mos.dn), &osp->os_meta_dnode, DNODE_SIZE);
+ grub_memmove (&(data->mos.dn), &((objset_phys_t *) osp)->os_meta_dnode,
+ DNODE_SIZE);
data->mos.endian = (grub_zfs_to_cpu64 (ub->ub_rootbp.blk_prop,
ub_endian) >> 63) & 1;
grub_free (osp);