mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00: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: da665fbd4858890fbb3bbf5da2a7b6ca37bb3220 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;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(fs) < 0)
|
||||
if (!(fs = virDomainFSDefNew(NULL)))
|
||||
goto error;
|
||||
|
||||
veid_str = g_strdup_printf("%d", veid);
|
||||
|
@ -3626,7 +3626,7 @@ vboxDumpSharedFolders(virDomainDefPtr def, vboxDriverPtr data, IMachine *machine
|
||||
char *hostPath = NULL;
|
||||
PRBool writable = PR_FALSE;
|
||||
|
||||
if (VIR_ALLOC(def->fss[i]) < 0)
|
||||
if (!(def->fss[i] = virDomainFSDefNew(data->xmlopt)))
|
||||
goto cleanup;
|
||||
|
||||
def->fss[i]->type = VIR_DOMAIN_FS_TYPE_MOUNT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user