mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-07 21:45:22 +00:00
avoid closing uninitialized fd
If the system does not support bypass cache, we will close fd,
but it is uninitialized.
(cherry picked from commit 0a045f01cf
)
This commit is contained in:
parent
37b07d90bb
commit
ab73fe59be
@ -3989,7 +3989,7 @@ qemuDomainSaveImageOpen(struct qemud_driver *driver,
|
|||||||
const char *xmlin, int state, bool edit,
|
const char *xmlin, int state, bool edit,
|
||||||
bool unlink_corrupt)
|
bool unlink_corrupt)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd = -1;
|
||||||
struct qemud_save_header header;
|
struct qemud_save_header header;
|
||||||
char *xml = NULL;
|
char *xml = NULL;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user