mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00: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:
parent
96b4f38603
commit
07360a0101
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user