[PATCH spice-server 10/11] Use GLib memory functions for RedsMigSpice::cert_subject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/main-channel.c | 4 ++--
 server/reds.c         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/main-channel.c b/server/main-channel.c
index d1fe8bd7d..eca857f6b 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -139,9 +139,9 @@ static void main_channel_fill_mig_target(MainChannel *main_channel, RedsMigSpice
     spice_assert(mig_target);
     g_free(main_channel->mig_target.host);
     main_channel->mig_target.host = g_strdup(mig_target->host);
-    free(main_channel->mig_target.cert_subject);
+    g_free(main_channel->mig_target.cert_subject);
     if (mig_target->cert_subject) {
-        main_channel->mig_target.cert_subject = spice_strdup(mig_target->cert_subject);
+        main_channel->mig_target.cert_subject = g_strdup(mig_target->cert_subject);
     } else {
         main_channel->mig_target.cert_subject = NULL;
     }
diff --git a/server/reds.c b/server/reds.c
index 8906708d1..05fb8fe9f 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2962,7 +2962,7 @@ static void reds_set_one_channel_security(RedsState *reds, int id, uint32_t secu
 static void reds_mig_release(RedServerConfig *config)
 {
     if (config->mig_spice) {
-        free(config->mig_spice->cert_subject);
+        g_free(config->mig_spice->cert_subject);
         g_free(config->mig_spice->host);
         g_free(config->mig_spice);
         config->mig_spice = NULL;
@@ -4118,7 +4118,7 @@ static int reds_set_migration_dest_info(RedsState *reds,
     spice_migration->sport = secure_port;
     spice_migration->host = g_strdup(dest);
     if (cert_subject) {
-        spice_migration->cert_subject = spice_strdup(cert_subject);
+        spice_migration->cert_subject = g_strdup(cert_subject);
     }
 
     reds->config->mig_spice = spice_migration;
-- 
2.13.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]