[Spice-devel] [PATCH spice-server 09/11] reds: Use GLib memory functions for RedServerConfig

Frediano Ziglio fziglio at redhat.com
Mon Sep 11 15:15:51 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/reds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 9b573987a..8906708d1 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3501,7 +3501,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
     const char *record_filename;
     RedsState *reds = g_new0(RedsState, 1);
 
-    reds->config = spice_new0(RedServerConfig, 1);
+    reds->config = g_new0(RedServerConfig, 1);
     reds->config->default_channel_security =
         SPICE_CHANNEL_SECURITY_NONE | SPICE_CHANNEL_SECURITY_SSL;
     reds->config->renderers = g_array_sized_new(FALSE, TRUE, sizeof(uint32_t), RED_RENDERER_LAST);
@@ -3715,7 +3715,7 @@ static void reds_config_free(RedServerConfig *config)
     g_free(config->spice_name);
     g_array_unref(config->renderers);
     g_array_unref(config->video_codecs);
-    free(config);
+    g_free(config);
 }
 
 SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer *reds)
-- 
2.13.5



More information about the Spice-devel mailing list