virt-edit: If case_sensitive_path returns an error, exit.

The 'windows_path' function was blindly copied from virt-cat.  In
virt-cat, errors are checked by the caller to 'windows_path'.  But
virt-edit lacks this check.  Change the function in virt-edit to add a
check and exit on error.
This commit is contained in:
Richard W.M. Jones
2012-09-28 09:57:49 +01:00
parent 6cd040fcdf
commit 55b7c4df78

View File

@@ -646,6 +646,8 @@ windows_path (guestfs_h *g, const char *root, const char *path)
char *t = guestfs_case_sensitive_path (g, ret);
free (ret);
ret = t;
if (ret == NULL)
exit (EXIT_FAILURE);
return ret;
}