]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix index error when clean up vport profile
authorHuanle Han <hanxueluo@gmail.com>
Tue, 7 Apr 2015 18:40:15 +0000 (02:40 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 14 Apr 2015 12:49:15 +0000 (14:49 +0200)
commitc61ded8a7d7bcfd60267c450fbb4c43169fdce1d
tree716f0aa44ce9342d56c5326c95226cbd8fcc6c2e
parent03d7462d87011c3db2ae82ae14d56d2979d92f0c
qemu: fix index error when clean up vport profile

1. 'last_good_net' indicates the index of last successfully configured
net. so def->nets[last_good_net] should also be clean up if error occurs.

2. if error occurs in 'virNetDevMacVLanVPortProfileRegisterCallback'
(second 'goto err_exit' in loop), we should also do
'virNetDevVPortProfileDisassociate' cleanup for the
'virNetDevVPortProfileAssociate'(first code block in loop). So we should
consider the net is successfully configured after first code block in
loop finishes.

Signed-off-by: Huanle Han <hanxueluo@gmail.com>
src/qemu/qemu_migration.c