From b126715a48cd0cbe32ec6468c267cd8cf2961c55 Mon Sep 17 00:00:00 2001 From: Ryan Woodsmall Date: Sat, 21 Apr 2012 14:13:02 +0200 Subject: [PATCH] esx: Fix segfault in esxConnectToHost Caused by commit 4445e16bfa8056980ac643fabf17186f9e685925 that made the code used the connection private data pointer before it was initialized. --- AUTHORS | 1 + src/esx/esx_driver.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index eee4998cb8..20e1b4bd30 100644 --- a/AUTHORS +++ b/AUTHORS @@ -232,6 +232,7 @@ Patches have also been contributed by: Stefan Bader MATSUDA Daiki Jan Kiszka + Ryan Woodsmall [....send patches to get your name here....] diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index dff8aa672e..d9f53f7418 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -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: -- GitLab