On 02/08/2012 03:07 PM, Osier Yang wrote:
Thanks and pushed now.
Alex
On 2012年02月08日 14:00, ajia@xxxxxxxxxx wrote:
From: Alex Jia<ajia@xxxxxxxxxx>
Forgot to free the domain object, this will intruduce resource leaks
including
memory leak and FD leaks.
* tools/virsh.c(cmdDesc): fix memory leak.
* How to reproduce?
% virsh desc<domain>
No description for domain:<domain>
error: Failed to disconnect from the hypervisor, 1 leaked reference(s)
Signed-off-by: Alex Jia<ajia@xxxxxxxxxx>
---
tools/virsh.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index bff7d5d..c107d8c 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1167,6 +1167,8 @@ cleanup:
unlink(tmp);
VIR_FREE(tmp);
}
+ if (dom)
+ virDomainFree(dom);
return ret;
}
ACK
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list