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

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



Signed-off-by: Martin Kletzander <mkletzan redhat com>
---

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


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