[PATCH] virsh: Fix virDomainFree for NULL domain in blkdeviotune

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---

Notes:
    Pushed as 'trivial'

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

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index bc42408..0402aef 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1130,7 +1130,8 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)

 cleanup:
     virTypedParamsFree(params, nparams);
-    virDomainFree(dom);
+    if (dom)
+        virDomainFree(dom);
     return ret;

 save_error:
-- 
1.8.2.1

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