[libvirt] PATCH: Don't try to close unopened connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The autostart code for UML and QEMU drivers had a place where it might
try to close a connection that is not open. This is harmless because
virConnectClose() checks for NULL, but it still causes an annoying
diagnosistic to be printed. This avoids it

Daniel

Index: src/uml_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/uml_driver.c,v
retrieving revision 1.25
diff -u -p -r1.25 uml_driver.c
--- src/uml_driver.c	3 Mar 2009 09:14:28 -0000	1.25
+++ src/uml_driver.c	13 Mar 2009 16:29:33 -0000
@@ -146,7 +146,8 @@ umlAutostartConfigs(struct uml_driver *d
         }
     }
 
-    virConnectClose(conn);
+    if (conn)
+        virConnectClose(conn);
 }
 
 
Index: src/qemu_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/qemu_driver.c,v
retrieving revision 1.214
diff -u -p -r1.214 qemu_driver.c
--- src/qemu_driver.c	3 Mar 2009 16:53:13 -0000	1.214
+++ src/qemu_driver.c	13 Mar 2009 16:29:34 -0000
@@ -235,7 +235,8 @@ qemudAutostartConfigs(struct qemud_drive
         virDomainObjUnlock(vm);
     }
 
-    virConnectClose(conn);
+    if (conn)
+        virConnectClose(conn);
 }
 
 


-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]