[PATCH 1/2] virnetsocket: Revert part of g_steal_pointer() rewrite

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

 



Turns out, the way that glib implements g_steal_pointer() is not
compatible with function callbacks. And that's what my recent
patch did in virNetSocketEventFree(). Revert that part.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/rpc/virnetsocket.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 5675c0769d..b1f47636d1 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -2156,9 +2156,10 @@ static void virNetSocketEventFree(void *opaque)
     void *eopaque;
 
     virObjectLock(sock);
-    ff = g_steal_pointer(&sock->ff);
+    ff = sock->ff;
     eopaque = g_steal_pointer(&sock->opaque);
     sock->func = NULL;
+    sock->ff = NULL;
     virObjectUnlock(sock);
 
     if (ff)
-- 
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