As of bba93d40 all of our RPC objects are derived from
virObjectLockable. However, during rewrite some errors sneaked
in. For instance, the dispose functions to virNetClient and
virNetServerClient objects were not only freeing allocated
memory, but unlocking themselves. This is wrong. Object should
never disappear while locked.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/rpc/virnetclient.c | 2 --
src/rpc/virnetserverclient.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index d7455b5..7fca055 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -622,8 +622,6 @@ void virNetClientDispose(void *obj)
#endif
virNetMessageClear(&client->msg);
-
- virObjectUnlock(client);
}
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index b2a4fdf..f5259c2 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -866,7 +866,6 @@ void virNetServerClientDispose(void *obj)
virObjectUnref(client->tlsCtxt);
#endif
virObjectUnref(client->sock);
- virObjectUnlock(client);
}
--
2.0.5