mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
remote_daemon_dispatch: Don't open code xdr_free()
At two places we are open coding xdr_free(): remoteRelayDomainEventTunable() and remoteRelayDomainEventJobCompleted(). Bot of these functions use make_nonnull_domain() to put domain IDs tuple into return structure and then continue encoding the rest of structure. If that fails, they call VIR_FREE() directly. While this okay, we should use xdr_free() which frees the whole return structure for us. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
29db40040c
commit
0e9823defc
@ -1156,8 +1156,7 @@ remoteRelayDomainEventTunable(virConnectPtr conn,
|
|||||||
(virTypedParameterRemotePtr *) &data.params.params_val,
|
(virTypedParameterRemotePtr *) &data.params.params_val,
|
||||||
&data.params.params_len,
|
&data.params.params_len,
|
||||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||||
VIR_FREE(data.dom.name);
|
goto error;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
||||||
@ -1323,8 +1322,7 @@ remoteRelayDomainEventJobCompleted(virConnectPtr conn,
|
|||||||
(virTypedParameterRemotePtr *) &data.params.params_val,
|
(virTypedParameterRemotePtr *) &data.params.params_val,
|
||||||
&data.params.params_len,
|
&data.params.params_len,
|
||||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||||
VIR_FREE(data.dom.name);
|
goto error;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
remoteDispatchObjectEventSend(callback->client, remoteProgram,
|
||||||
|
Loading…
Reference in New Issue
Block a user