virNetClientRemoveStream starts by calling a lock.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/rpc/virnetclient.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 42703664fe..2e0aa9ca7c 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -1043,8 +1043,10 @@ int virNetClientAddStream(virNetClientPtr client,
void virNetClientRemoveStream(virNetClientPtr client,
virNetClientStreamPtr st)
{
- virObjectLock(client);
size_t i;
+
+ virObjectLock(client);
+
for (i = 0; i < client->nstreams; i++) {
if (client->streams[i] == st)
break;
--
2.26.2