From aad687317509351df8cc4b3aaadcd4af501dfa58 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 16 Mar 2009 10:30:04 +0000 Subject: [PATCH] Don't try to close NULL virConnectPtr object --- ChangeLog | 6 ++++++ src/qemu_driver.c | 3 ++- src/uml_driver.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index de75536759..a84e2b4b33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 16 10:29:00 GMT 2009 Daniel P. Berrange + + Avoid harmless warning message + * src/qemu_driver.c, src/uml_driver.c: Don't try to close a + NULL virConnectPtr object. + Thu Mar 12 21:13:40 CET 2009 Daniel Veillard * src/storage_conf.c: fix storage pool mode parsing, and refactoring diff --git a/src/qemu_driver.c b/src/qemu_driver.c index e73bd3aacc..dad709869f 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -235,7 +235,8 @@ qemudAutostartConfigs(struct qemud_driver *driver) { virDomainObjUnlock(vm); } - virConnectClose(conn); + if (conn) + virConnectClose(conn); } diff --git a/src/uml_driver.c b/src/uml_driver.c index a1fbc776b6..1dc7ccdfea 100644 --- a/src/uml_driver.c +++ b/src/uml_driver.c @@ -146,7 +146,8 @@ umlAutostartConfigs(struct uml_driver *driver) { } } - virConnectClose(conn); + if (conn) + virConnectClose(conn); } -- GitLab