From: Francesco Romani Date: Tue, 13 Dec 2016 15:34:24 +0000 (+0100) Subject: virt plugin: Use lv_disconnect on shutdown X-Git-Tag: collectd-5.8.0~266^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c5021819bb8d330bb3976bda5399abacb32ccb9f;p=collectd.git virt plugin: Use lv_disconnect on shutdown Avoiding duplication of the code and let's use the new lv_disconnect() helper in the lv_shutdown() callback. Signed-off-by: Francesco Romani --- diff --git a/src/virt.c b/src/virt.c index 471bdd74..4dce6e03 100644 --- a/src/virt.c +++ b/src/virt.c @@ -1178,9 +1178,7 @@ static int lv_shutdown(void) { lv_fini_instance(i); } - if (conn != NULL) - virConnectClose(conn); - conn = NULL; + lv_disconnect(); ignorelist_free(il_domains); il_domains = NULL;