mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-26 07:34:04 +03: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:
committed by
Daniel Veillard
parent
95eaf7ba7f
commit
2aa83b43d3
@@ -240,6 +240,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
|
||||
VIR_FREE(tmp);
|
||||
break;
|
||||
}
|
||||
prev = tmp;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user