[libvirt] [PATCH] Fix possible segfault if starting qemu vm with an inactive virtual network

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

 



The attached patch fixes a possible segfault if trying
to start a domain which tries to use an inactive
virtual network. We should explicitly catch that error
and report it, but that's a separate patch.

Thanks,
Cole
commit eca87f821890c7d54f2ba57288acad1b234ec13e
Author: Cole Robinson <crobinso@xxxxxxxxxx>
Date:   Thu Oct 2 17:12:44 2008 -0400

    Fix possible segfault if starting a domain with an inactive network.

diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 23ef050..5c41f9a 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -1235,7 +1235,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
  error:
     if (tapfds &&
         *tapfds) {
-        for (i = 0; ntapfds; i++)
+        for (i = 0; i < *ntapfds; i++)
             close((*tapfds)[i]);
         VIR_FREE(*tapfds);
         *ntapfds = 0;
--
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]