* util/getroot.c (convert_system_partition_to_system_disk): Fix use
after free. Reported by: Peter Jones.
This commit is contained in:
parent
255818026e
commit
4e75f21c33
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2012-03-31 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/getroot.c (convert_system_partition_to_system_disk): Fix use
|
||||||
|
after free.
|
||||||
|
Reported by: Peter Jones.
|
||||||
|
|
||||||
2012-03-31 Anton Blanchard <anton@samba.org>
|
2012-03-31 Anton Blanchard <anton@samba.org>
|
||||||
|
|
||||||
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Do not byteswap
|
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Do not byteswap
|
||||||
|
|
|
@ -1892,13 +1892,16 @@ devmapper_out:
|
||||||
if (! mapper_name)
|
if (! mapper_name)
|
||||||
grub_dprintf ("hostdisk", "%s has no DM name\n", path);
|
grub_dprintf ("hostdisk", "%s has no DM name\n", path);
|
||||||
}
|
}
|
||||||
|
char *ret;
|
||||||
|
if (mapper_name)
|
||||||
|
ret = xasprintf ("/dev/mapper/%s", mapper_name);
|
||||||
|
else
|
||||||
|
ret = NULL;
|
||||||
|
|
||||||
if (tree)
|
if (tree)
|
||||||
dm_tree_free (tree);
|
dm_tree_free (tree);
|
||||||
free (path);
|
free (path);
|
||||||
if (mapper_name)
|
return ret;
|
||||||
return xasprintf ("/dev/mapper/%s", mapper_name);
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
#endif /* HAVE_DEVICE_MAPPER */
|
#endif /* HAVE_DEVICE_MAPPER */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue