]> 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)
committerCole Robinson <crobinso@redhat.com>
Wed, 25 Apr 2012 20:39:49 +0000 (16:39 -0400)
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 d8ef31a61477e90eeddbcc406bffb55d8b5ee8a9..e42f9c402b7628bbd55a414ef4d07fec73dca990 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: