Fix segfault if starting qemu VM with an inactive virtual network.

This commit is contained in:
Cole Robinson 2008-10-06 19:36:46 +00:00
parent a588bf5514
commit 8206b421d6
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Oct 6 15:32:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* 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 <crobinso@redhat.com> Mon Oct 6 15:23:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* tests/domainschematest: Slim down schema test result output * tests/domainschematest: Slim down schema test result output

View File

@ -1235,7 +1235,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
error: error:
if (tapfds && if (tapfds &&
*tapfds) { *tapfds) {
for (i = 0; ntapfds; i++) for (i = 0; i < *ntapfds; i++)
close((*tapfds)[i]); close((*tapfds)[i]);
VIR_FREE(*tapfds); VIR_FREE(*tapfds);
*ntapfds = 0; *ntapfds = 0;