aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-07-30 10:14:56 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-08-07 11:47:55 +0100
commit05e4e7b46ee7fdb46931875f3db6b4d3688bcdf5 (patch)
treefa92d0353fb5954e556c11ffdfc21900a24537bd /src/remote/remote_driver.c
parentTurn virNetServer* into virObject instances (diff)
downloadlibvirt-05e4e7b46ee7fdb46931875f3db6b4d3688bcdf5.tar.gz
libvirt-05e4e7b46ee7fdb46931875f3db6b4d3688bcdf5.tar.bz2
libvirt-05e4e7b46ee7fdb46931875f3db6b4d3688bcdf5.zip
Turn virNetClient* into virObject instances
Make all the virNetClient* objects use virObject APIs for reference counting Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'src/remote/remote_driver.c')
-rw-r--r--src/remote/remote_driver.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 38b11e1a3..353a1536c 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -792,10 +792,10 @@ doRemoteOpen (virConnectPtr conn,
virReportOOMError();
failed:
- virNetClientProgramFree(priv->remoteProgram);
- virNetClientProgramFree(priv->qemuProgram);
+ virObjectUnref(priv->remoteProgram);
+ virObjectUnref(priv->qemuProgram);
virNetClientClose(priv->client);
- virNetClientFree(priv->client);
+ virObjectUnref(priv->client);
priv->client = NULL;
VIR_FREE(priv->hostname);
@@ -946,10 +946,10 @@ doRemoteClose (virConnectPtr conn, struct private_data *priv)
virObjectUnref(priv->tls);
priv->tls = NULL;
virNetClientClose(priv->client);
- virNetClientFree(priv->client);
+ virObjectUnref(priv->client);
priv->client = NULL;
- virNetClientProgramFree(priv->remoteProgram);
- virNetClientProgramFree(priv->qemuProgram);
+ virObjectUnref(priv->remoteProgram);
+ virObjectUnref(priv->qemuProgram);
priv->remoteProgram = priv->qemuProgram = NULL;
/* Free hostname copy */
@@ -4171,7 +4171,7 @@ remoteStreamFinish(virStreamPtr st)
cleanup:
virNetClientRemoveStream(priv->client, privst);
- virNetClientStreamFree(privst);
+ virObjectUnref(privst);
st->privateData = NULL;
st->driver = NULL;
@@ -4206,7 +4206,7 @@ remoteStreamAbort(virStreamPtr st)
cleanup:
virNetClientRemoveStream(priv->client, privst);
- virNetClientStreamFree(privst);
+ virObjectUnref(privst);
st->privateData = NULL;
st->driver = NULL;
@@ -4507,7 +4507,7 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn,
goto done;
if (virNetClientAddStream(priv->client, netst) < 0) {
- virNetClientStreamFree(netst);
+ virObjectUnref(netst);
goto done;
}
@@ -4525,7 +4525,7 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn,
(xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_args, (char *) &args,
(xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_ret, (char *) &ret) == -1) {
virNetClientRemoveStream(priv->client, netst);
- virNetClientStreamFree(netst);
+ virObjectUnref(netst);
goto done;
}