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

[libvirt] [PATCH] virsh: Call virDomainFree in cmdDomFSTrim



The virsh domfstrim command was not freeing allocated domain,
leaving leaked references behind.
---
 tools/virsh-domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 5ddcedc..5fbfeee 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10058,6 +10058,8 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
     ret = true;
 
 cleanup:
+    if (dom)
+        virDomainFree(dom);
     return ret;
 }
 
-- 
1.8.1.5


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