Domain name duplicated in make_nonnull_domain, but not freed when virTypedParamsSerialize
return negative.
---
daemon/remote.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 1610fea..5d726f4 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -1067,7 +1067,7 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
(virTypedParameterRemotePtr *)
&data.params.params_val,
&data.params.params_len,
VIR_TYPED_PARAM_STRING_OKAY) < 0)
- return -1;
+ goto error;
remoteDispatchObjectEventSend(callback->client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE,
@@ -1075,6 +1075,10 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
&data);
return 0;
+ error:
+ VIR_FREE(data.dom.name);
+ return -1;
+
}
@@ -1207,13 +1211,16 @@ remoteRelayDomainEventJobCompleted(virConnectPtr conn,
(virTypedParameterRemotePtr *)
&data.params.params_val,
&data.params.params_len,
VIR_TYPED_PARAM_STRING_OKAY) < 0)
- return -1;
+ goto error;
remoteDispatchObjectEventSend(callback->client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED,
(xdrproc_t)xdr_remote_domain_event_callback_job_completed_msg,
&data);
return 0;
+ error:
+ VIR_FREE(data.dom.name);
+ return -1;
}
--
2.8.3