[PATCH 2/4] virsh: domain: Clean up handling of "dom" in "save" command

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

 



---
 tools/virsh-domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index ed2e3ea..f04dd17 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3887,7 +3887,8 @@ doSave(void *opaque)
  out:
     pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
  out_sig:
-    if (dom) virDomainFree(dom);
+    if (dom)
+        virDomainFree(dom);
     VIR_FREE(xml);
     ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
 }
@@ -4051,8 +4052,7 @@ cmdSave(vshControl *ctl, const vshCmd *cmd)
         vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);

  cleanup:
-    if (dom)
-        virDomainFree(dom);
+    virDomainFree(dom);
     return ret;
 }

-- 
2.0.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]