if (roots[0] == NULL) {
fprintf (stderr, _("%s: no operating system was found on this disk\n"),
program_name);
+ free_strings (roots);
exit (EXIT_FAILURE);
}
if (roots[1] != NULL) {
fprintf (stderr, _("%s: multi-boot operating systems are not supported by the -i option\n"),
program_name);
+ free_strings (roots);
exit (EXIT_FAILURE);
}
print_inspect_prompt (void)
{
char *name = guestfs_inspect_get_product_name (g, root);
- if (STRNEQ (name, "unknown"))
+ if (name && STRNEQ (name, "unknown"))
printf (_("Operating system: %s\n"), name);
free (name);