At 2011-7-2 7:36, Eric Blake write:
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.
---
src/rpc/virnetserverclient.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 5c23cf2..30d7fcb 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -240,6 +240,7 @@ void virNetServerClientRemoveFilter(virNetServerClientPtr client,
VIR_FREE(tmp);
break;
}
+ prev = tmp;
tmp = tmp->next;
}
ACK