]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Fix segfault in esxConnectToHost
authorRyan Woodsmall <rwoodsmall@gmail.com>
Sat, 21 Apr 2012 12:13:02 +0000 (14:13 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 21 Apr 2012 12:13:22 +0000 (14:13 +0200)
Caused by commit 4445e16bfa8056980ac643fabf17186f9e685925 that
made the code used the connection private data pointer before
it was initialized.

AUTHORS
src/esx/esx_driver.c

diff --git a/AUTHORS b/AUTHORS
index eee4998cb840c08fd54a0d593ee20e1aa631beb5..20e1b4bd305448da939e07525aa7a328660e2d6a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -232,6 +232,7 @@ Patches have also been contributed by:
   Stefan Bader         <stefan.bader@canonical.com>
   MATSUDA Daiki        <matsudadik@intellilink.co.jp>
   Jan Kiszka           <jan.kiszka@siemens.com>
+  Ryan Woodsmall       <rwoodsmall@gmail.com>
 
   [....send patches to get your name here....]
 
index dff8aa672ea1d2e01a20ec2bab5f3abf838d8532..d9f53f7418dca696cb6570dd852ba3644166f066 100644 (file)
@@ -1023,6 +1023,8 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
     priv->supportsLongMode = esxVI_Boolean_Undefined;
     priv->usedCpuTimeCounterId = -1;
 
+    conn->privateData = priv;
+
     /*
      * Set the port dependent on the transport protocol if no port is
      * specified. This allows us to rely on the port parameter being
@@ -1114,8 +1116,6 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth,
         goto cleanup;
     }
 
-    conn->privateData = priv;
-
     result = VIR_DRV_OPEN_SUCCESS;
 
   cleanup: