[Spice-devel] [PATCH spice-server v2 13/23] reds: Use GLib memory functions for ChannelSecurityOptions

Frediano Ziglio fziglio at redhat.com
Wed Sep 20 07:51:06 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 db8406a93..b92d1b73a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2951,7 +2951,7 @@ static void reds_set_one_channel_security(RedsState *reds, int id, uint32_t secu
         security_options->options = security;
         return;
     }
-    security_options = spice_new(ChannelSecurityOptions, 1);
+    security_options = g_new(ChannelSecurityOptions, 1);
     security_options->channel_id = id;
     security_options->options = security;
     security_options->next = reds->config->channels_security;
@@ -3708,7 +3708,7 @@ static void reds_config_free(RedServerConfig *config)
     reds_mig_release(config);
     for (curr = config->channels_security; curr; curr = next) {
         next = curr->next;
-        free(curr);
+        g_free(curr);
     }
 #if HAVE_SASL
     g_free(config->sasl_appname);
-- 
2.13.5



More information about the Spice-devel mailing list