Capabilities are allocated even in reds.c. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/reds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/reds.c b/server/reds.c index dcdc29d63..13842fb1a 100644 --- a/server/reds.c +++ b/server/reds.c @@ -1749,14 +1749,14 @@ red_channel_capabilities_init_from_link_message(RedChannelCapabilities *caps, caps->num_common_caps = link_mess->num_common_caps; caps->common_caps = NULL; if (caps->num_common_caps) { - caps->common_caps = spice_memdup(raw_caps, - link_mess->num_common_caps * sizeof(uint32_t)); + caps->common_caps = g_memdup(raw_caps, + link_mess->num_common_caps * sizeof(uint32_t)); } caps->num_caps = link_mess->num_channel_caps; caps->caps = NULL; if (link_mess->num_channel_caps) { - caps->caps = spice_memdup(raw_caps + link_mess->num_common_caps, - link_mess->num_channel_caps * sizeof(uint32_t)); + caps->caps = g_memdup(raw_caps + link_mess->num_common_caps, + link_mess->num_channel_caps * sizeof(uint32_t)); } } -- 2.13.5 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel