[libvirt] [PATCH] Avoid segv if ncf_init fails

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

 



If ncf_init() fails, it takes responsibility to call ncf_close() when
appropriate. Having libvirt call it results in a double close, which
ends up segv'ing.
---
 src/interface/netcf_driver.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c
index b5c3664..c44ba62 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/netcf_driver.c
@@ -142,10 +142,6 @@ static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn,
     return 0;
 
 netcf_error:
-    if (driverState->netcf)
-    {
-        ncf_close(driverState->netcf);
-    }
     virMutexDestroy (&driverState->lock);
 mutex_error:
     VIR_FREE(driverState);
-- 
1.6.5.15.gc274d

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