From: Cole Robinson Date: Mon, 6 Oct 2008 19:36:46 +0000 (+0000) Subject: Fix segfault if starting qemu VM with an inactive virtual network. X-Git-Tag: LIBVIRT_0_5_0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8206b421d6d8fbbb32d8c3a4558404f1189a428e;p=thirdparty%2Flibvirt.git Fix segfault if starting qemu VM with an inactive virtual network. --- diff --git a/ChangeLog b/ChangeLog index 79e1dbe3f7..e0b69a39e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 6 15:32:00 EST 2008 Cole Robinson + + * src/qemu_conf.c: Fix possible segfault if starting a qemu guest with + with an inactive virtual network. + Mon Oct 6 15:23:00 EST 2008 Cole Robinson * tests/domainschematest: Slim down schema test result output diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 23ef050e75..5c41f9a85c 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;