]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virnet*: Don't unlock object in dispose
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Mar 2015 10:06:35 +0000 (11:06 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Mar 2015 11:36:08 +0000 (12:36 +0100)
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@redhat.com>
src/rpc/virnetclient.c
src/rpc/virnetserverclient.c

index d7455b571d55a2584f3f3f3c572adc88b9f5782f..7fca055e86051e52815fe93509df7885f14f9284 100644 (file)
@@ -622,8 +622,6 @@ void virNetClientDispose(void *obj)
 #endif
 
     virNetMessageClear(&client->msg);
-
-    virObjectUnlock(client);
 }
 
 
index b2a4fdf7751472ddb574229463f270cf88bd2115..f5259c22dbafffa5c576f1696a31ca2741b6afcf 100644 (file)
@@ -866,7 +866,6 @@ void virNetServerClientDispose(void *obj)
     virObjectUnref(client->tlsCtxt);
 #endif
     virObjectUnref(client->sock);
-    virObjectUnlock(client);
 }