[calls] settings: Fix memory leak



commit ab3ff5772b9e6878c28832bbd9e2bd57331fa34c
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Thu Jan 27 17:21:31 2022 +0100

    settings: Fix memory leak
    
    g_settings_get_string() and g_settings_get_strv() are transfer full,
    so we should use g_value_take_string() instead of g_value_set_string() and
    g_value_take_boxed() instead of g_value_set_boxed()

 src/calls-settings.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/calls-settings.c b/src/calls-settings.c
index 9701c807..965f6f94 100644
--- a/src/calls-settings.c
+++ b/src/calls-settings.c
@@ -101,15 +101,15 @@ calls_settings_get_property (GObject    *object,
     break;
 
   case PROP_COUNTRY_CODE:
-    g_value_set_string (value, calls_settings_get_country_code (self));
+    g_value_take_string (value, calls_settings_get_country_code (self));
     break;
 
   case PROP_AUTOLOAD_PLUGINS:
-    g_value_set_boxed (value, calls_settings_get_autoload_plugins (self));
+    g_value_take_boxed (value, calls_settings_get_autoload_plugins (self));
     break;
 
   case PROP_PREFERRED_AUDIO_CODECS:
-    g_value_set_boxed (value, calls_settings_get_preferred_audio_codecs (self));
+    g_value_take_boxed (value, calls_settings_get_preferred_audio_codecs (self));
     break;
 
   default:


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