提交 29db4004 编写于 作者: M Michal Privoznik

remote_daemon_dispatch: Don't leak @ret on failure

If there's a problem in encoding @ret (for instance
virTypedParamsSerialize() fails) then @ret is leaked.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 86720ef1
...@@ -7025,8 +7025,11 @@ remoteDispatchConnectGetAllDomainStats(virNetServerPtr server ATTRIBUTE_UNUSED, ...@@ -7025,8 +7025,11 @@ remoteDispatchConnectGetAllDomainStats(virNetServerPtr server ATTRIBUTE_UNUSED,
rv = 0; rv = 0;
cleanup: cleanup:
if (rv < 0) if (rv < 0) {
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
xdr_free((xdrproc_t)xdr_remote_connect_get_all_domain_stats_ret,
(char *) ret);
}
virDomainStatsRecordListFree(retStats); virDomainStatsRecordListFree(retStats);
virObjectListFree(doms); virObjectListFree(doms);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册