[libvirt PATCH 06/14] bhyve: use g_auto in virBhyveProcessStop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/bhyve/bhyve_process.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c
index ead6b0e522..ee692d2ba3 100644
--- a/src/bhyve/bhyve_process.c
+++ b/src/bhyve/bhyve_process.c
@@ -285,7 +285,7 @@ virBhyveProcessStop(struct _bhyveConn *driver,
                     virDomainShutoffReason reason)
 {
     int ret = -1;
-    virCommand *cmd = NULL;
+    g_autoptr(virCommand) cmd = NULL;
     bhyveDomainObjPrivate *priv = vm->privateData;
 
     if (!virDomainObjIsActive(vm)) {
@@ -335,8 +335,6 @@ virBhyveProcessStop(struct _bhyveConn *driver,
     bhyveProcessStopHook(vm, VIR_HOOK_BHYVE_OP_RELEASE);
 
  cleanup:
-    virCommandFree(cmd);
-
     virPidFileDelete(BHYVE_STATE_DIR, vm->def->name);
     virDomainDeleteConfig(BHYVE_STATE_DIR, NULL, vm);
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux