mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user