mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix allocation of virDomainFSDef
Some less commonly used drivers were omitted when we switched
the allocator from a plain VIR_ALLOC to virDomainFSDefNew.
https://bugzilla.redhat.com/show_bug.cgi?id=1846450
Fixes: da665fbd48
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
f1d7852a43
commit
ea33200488
@ -357,7 +357,7 @@ openvzReadFSConf(virDomainDefPtr def,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(fs) < 0)
|
if (!(fs = virDomainFSDefNew(NULL)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
veid_str = g_strdup_printf("%d", veid);
|
veid_str = g_strdup_printf("%d", veid);
|
||||||
|
@ -3626,7 +3626,7 @@ vboxDumpSharedFolders(virDomainDefPtr def, vboxDriverPtr data, IMachine *machine
|
|||||||
char *hostPath = NULL;
|
char *hostPath = NULL;
|
||||||
PRBool writable = PR_FALSE;
|
PRBool writable = PR_FALSE;
|
||||||
|
|
||||||
if (VIR_ALLOC(def->fss[i]) < 0)
|
if (!(def->fss[i] = virDomainFSDefNew(data->xmlopt)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
def->fss[i]->type = VIR_DOMAIN_FS_TYPE_MOUNT;
|
def->fss[i]->type = VIR_DOMAIN_FS_TYPE_MOUNT;
|
||||||
|
Loading…
Reference in New Issue
Block a user