From: Tyrel D. <ty...@us...> - 2011-05-16 05:40:28
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv1636/plugin Modified Files: metricVirt.c Log Message: Fixed 3302709: leak libvir connections when no domains Index: metricVirt.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricVirt.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- metricVirt.c 12 May 2011 00:46:29 -0000 1.10 +++ metricVirt.c 16 May 2011 05:40:26 -0000 1.11 @@ -268,8 +268,10 @@ return VIRT_FAIL; /* no domains reported */ - if (node_statistics.total_domains == 0) - return VIRT_FAIL; + if (node_statistics.total_domains == 0) { + virConnectClose(conn); + return VIRT_SUCCESS; + } /* * get statistics from active domains |