1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

rpc: move lock after declaration

virNetClientRemoveStream starts by calling a lock.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2020-07-28 20:00:03 +02:00
parent 96b4f38603
commit 07360a0101

View File

@ -1045,8 +1045,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;