[mutter/gnome-3-26] backends: Unref variants obtained from g_variant_iter_get_next_value()



commit 656f64f3a5950b2cc9b5ac9236ce63a2ed42011e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 27 12:27:00 2017 +0200

    backends: Unref variants obtained from g_variant_iter_get_next_value()
    
    Those are being leaked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789553

 src/backends/meta-monitor-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 343bb06..df51ca0 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -1778,6 +1778,8 @@ create_logical_monitor_config_from_variant (MetaMonitorManager          *manager
       monitor_config =
         create_monitor_config_from_variant (manager,
                                             monitor_config_variant, error);
+      g_variant_unref (monitor_config_variant);
+
       if (!monitor_config)
         goto err;
 
@@ -1928,6 +1930,8 @@ meta_monitor_manager_handle_apply_monitors_config (MetaDBusDisplayConfig *skelet
                                                     logical_monitor_config_variant,
                                                     layout_mode,
                                                     &error);
+      g_variant_unref (logical_monitor_config_variant);
+
       if (!logical_monitor_config)
         {
           g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,


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