
On Thu, Oct 08, 2020 at 02:12:09PM +0200, Ján Tomko wrote:
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/remote/remote_daemon_config.c | 3 +- src/remote/remote_daemon_dispatch.c | 225 ++++++++++------------------ src/remote/remote_daemon_stream.c | 6 +- src/remote/remote_driver.c | 102 ++++--------- 4 files changed, 108 insertions(+), 228 deletions(-)
[...]
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index a659737bc7..90115167fb 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -2413,16 +2406,14 @@ remoteDispatchDomainMemoryStats(virNetServerPtr server G_GNUC_UNUSED, goto cleanup;
/* Allocate stats array for making dispatch call */ - if (VIR_ALLOC_N(stats, args->maxStats) < 0) - goto cleanup; + stats = g_new0(struct _virDomainMemoryStat, args->maxStats);
We have virDomainMemoryStatStruct but this works as well. Pavel