mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
conf: Clean up virDomainHostdevDefNew()
Follow the same style as other similar functions. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
1d0c6f59b6
commit
fd91ac817d
@ -2434,13 +2434,13 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
|
||||
virDomainHostdevDefPtr
|
||||
virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt)
|
||||
{
|
||||
virDomainHostdevDefPtr def = NULL;
|
||||
virDomainHostdevDefPtr def;
|
||||
|
||||
if (VIR_ALLOC(def) < 0 ||
|
||||
VIR_ALLOC(def->info) < 0) {
|
||||
VIR_FREE(def);
|
||||
if (VIR_ALLOC(def) < 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(def->info) < 0)
|
||||
goto error;
|
||||
|
||||
if (xmlopt &&
|
||||
xmlopt->privateData.hostdevNew &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user