From c5021819bb8d330bb3976bda5399abacb32ccb9f Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Tue, 13 Dec 2016 16:34:24 +0100 Subject: [PATCH] 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 --- src/virt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.11.0