mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
lxc: use g_auto for virCommand in virLXCProcessEnsureRootFS
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1e6b81cdec
commit
4c5bcaf027
@ -1187,7 +1187,7 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
g_autofree char *timestamp = NULL;
|
g_autofree char *timestamp = NULL;
|
||||||
int nsInheritFDs[VIR_LXC_DOMAIN_NAMESPACE_LAST];
|
int nsInheritFDs[VIR_LXC_DOMAIN_NAMESPACE_LAST];
|
||||||
virCommand *cmd = NULL;
|
g_autoptr(virCommand) cmd = NULL;
|
||||||
virLXCDomainObjPrivate *priv = vm->privateData;
|
virLXCDomainObjPrivate *priv = vm->privateData;
|
||||||
g_autoptr(virCaps) caps = NULL;
|
g_autoptr(virCaps) caps = NULL;
|
||||||
virErrorPtr err = NULL;
|
virErrorPtr err = NULL;
|
||||||
@ -1555,7 +1555,6 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
virLXCProcessCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, stopFlags);
|
virLXCProcessCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, stopFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virCommandFree(cmd);
|
|
||||||
for (i = 0; i < nttyFDs; i++)
|
for (i = 0; i < nttyFDs; i++)
|
||||||
VIR_FORCE_CLOSE(ttyFDs[i]);
|
VIR_FORCE_CLOSE(ttyFDs[i]);
|
||||||
for (i = 0; i < G_N_ELEMENTS(handshakefds); i++)
|
for (i = 0; i < G_N_ELEMENTS(handshakefds); i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user