* util/getroot.c (convert_system_partition_to_system_disk): Fix use

after free.
	Reported by: Peter Jones.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-31 12:27:10 +02:00
parent 255818026e
commit 4e75f21c33
2 changed files with 13 additions and 4 deletions

View file

@ -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>
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Do not byteswap

View file

@ -1892,13 +1892,16 @@ devmapper_out:
if (! mapper_name)
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)
dm_tree_free (tree);
free (path);
if (mapper_name)
return xasprintf ("/dev/mapper/%s", mapper_name);
else
return NULL;
return ret;
}
#endif /* HAVE_DEVICE_MAPPER */
}