[PATCH] cygwin: fix abort of virsh on my system

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

 



This strange patch fixes aborts of virsh on my system. It seems that the
string returned by xmlSaveUri is owned by the xml library??

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 317125f..a916b86 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -542,6 +542,9 @@ doRemoteOpen (virConnectPtr conn,
                 }
 
                 name = (char *) xmlSaveUri (&tmpuri);
+#ifdef __CYGWIN__
+                name = strdup(name);
+#endif
 
 #ifdef HAVE_XMLURI_QUERY_RAW
                 VIR_FREE(tmpuri.query_raw);


--
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]