[Spice-devel] [PATCH spice-server] fixup! Start using GLib memory allocation

Frediano Ziglio fziglio at redhat.com
Tue Sep 19 06:33:10 UTC 2017


Capabilities are allocated even in reds.c.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 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



More information about the Spice-devel mailing list