[libvirt PATCH 08/19] rpc: move lock after declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virNetClientRemoveStream starts by calling a lock.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux