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:
parent
95eaf7ba7f
commit
2aa83b43d3
@ -240,6 +240,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
|
|||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
prev = tmp;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user