From: Daniel P. Berrange Date: Thu, 23 Oct 2014 13:33:11 +0000 (+0100) Subject: Update Hyper-V driver to always use privateData X-Git-Tag: CVE-2014-8135~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63c3c5399b9df0a25e666f816c959bcd1c97c055;p=thirdparty%2Flibvirt.git Update Hyper-V driver to always use privateData Since the secondary drivers are only active when the primary driver is also the Hyper-V driver, there is no need to use the different type specific privateData fields. --- diff --git a/src/hyperv/hyperv_device_monitor.c b/src/hyperv/hyperv_device_monitor.c index 5332eb2b75..23411cd206 100644 --- a/src/hyperv/hyperv_device_monitor.c +++ b/src/hyperv/hyperv_device_monitor.c @@ -44,18 +44,14 @@ hypervNodeDeviceOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->nodeDevicePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNodeDeviceClose(virConnectPtr conn) +hypervNodeDeviceClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->nodeDevicePrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_interface_driver.c b/src/hyperv/hyperv_interface_driver.c index b93cf30ef4..9b9e4e605e 100644 --- a/src/hyperv/hyperv_interface_driver.c +++ b/src/hyperv/hyperv_interface_driver.c @@ -44,18 +44,14 @@ hypervInterfaceOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->interfacePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervInterfaceClose(virConnectPtr conn) +hypervInterfaceClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->interfacePrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index 6f54f44976..ab2daad65b 100644 --- a/src/hyperv/hyperv_network_driver.c +++ b/src/hyperv/hyperv_network_driver.c @@ -44,18 +44,14 @@ hypervNetworkOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->networkPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNetworkClose(virConnectPtr conn) +hypervNetworkClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->networkPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_nwfilter_driver.c b/src/hyperv/hyperv_nwfilter_driver.c index a82db9259b..6165bf7f89 100644 --- a/src/hyperv/hyperv_nwfilter_driver.c +++ b/src/hyperv/hyperv_nwfilter_driver.c @@ -44,18 +44,14 @@ hypervNWFilterOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->nwfilterPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNWFilterClose(virConnectPtr conn) +hypervNWFilterClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->nwfilterPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_secret_driver.c b/src/hyperv/hyperv_secret_driver.c index 81764842a4..65587f03bc 100644 --- a/src/hyperv/hyperv_secret_driver.c +++ b/src/hyperv/hyperv_secret_driver.c @@ -44,18 +44,14 @@ hypervSecretOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->secretPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervSecretClose(virConnectPtr conn) +hypervSecretClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->secretPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_storage_driver.c b/src/hyperv/hyperv_storage_driver.c index af3cca4d53..e3d4170a82 100644 --- a/src/hyperv/hyperv_storage_driver.c +++ b/src/hyperv/hyperv_storage_driver.c @@ -44,18 +44,14 @@ hypervStorageOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->storagePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervStorageClose(virConnectPtr conn) +hypervStorageClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->storagePrivateData = NULL; - return 0; }