1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

rpc: fix logic bug

Spotted by Coverity.  If we don't update tmp each time through
the loop, then if the filter being removed was not the head of
the list, we accidentally lose all filters prior to the one we
wanted to remove.

* src/rpc/virnetserverclient.c (virNetServerClientRemoveFilter):
    Don't lose unrelated filters.
This commit is contained in:
Eric Blake 2011-07-04 09:45:21 +08:00 committed by Daniel Veillard
parent 95eaf7ba7f
commit 2aa83b43d3

View File

@ -240,6 +240,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
VIR_FREE(tmp); VIR_FREE(tmp);
break; break;
} }
prev = tmp;
tmp = tmp->next; tmp = tmp->next;
} }