mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
daemon: Fix domain name leak in error path
Domain name is duplicated in make_nonnull_domain, but not freed when
virTypedParamsSerialize returns error.
(cherry picked from commit f69340472c
)
This commit is contained in:
parent
2222624db6
commit
7893cc87e0
@ -1066,8 +1066,10 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &data.params.params_val,
|
||||
&data.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0)
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
VIR_FREE(data.dom.name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
||||
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE,
|
||||
@ -1206,8 +1208,10 @@ remoteRelayDomainEventJobCompleted(virConnectPtr conn,
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &data.params.params_val,
|
||||
&data.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0)
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
VIR_FREE(data.dom.name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
||||
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED,
|
||||
|
Loading…
Reference in New Issue
Block a user