[Xfce4-commits] <xfce4-panel:devel> Fix 2 memory leaks.

Nick Schermer noreply at xfce.org
Tue Nov 24 16:38:03 CET 2009


Updating branch refs/heads/devel
         to 5589082a926c129a239d99f43e53c4aee1d10e7d (commit)
       from dc804e34984880616506ee86f770f6fff23825d4 (commit)

commit 5589082a926c129a239d99f43e53c4aee1d10e7d
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Nov 24 16:35:55 2009 +0100

    Fix 2 memory leaks.

 panel/panel-application.c     |    2 ++
 panel/panel-plugin-external.c |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/panel/panel-application.c b/panel/panel-application.c
index 448e4a5..7cfc081 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -344,6 +344,8 @@ panel_application_load (PanelApplication *application)
 
           g_free (name);
         }
+
+      xfconf_array_free (array);
     }
 }
 
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index 9ef79f6..ee2dbc9 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -317,7 +317,10 @@ panel_plugin_external_finalize (GObject *object)
     }
 
   if (external->queue != NULL)
-    g_ptr_array_free (external->queue, TRUE);
+    {
+      g_ptr_array_foreach (external->queue, (GFunc) g_value_array_free, NULL);
+      g_ptr_array_free (external->queue, TRUE);
+    }
 
   g_strfreev (external->arguments);
 
@@ -595,6 +598,7 @@ panel_plugin_external_dbus_set (PanelPluginExternal *external,
       g_signal_emit (G_OBJECT (external), external_signals[SET], 0,
                      external->queue);
 
+      g_ptr_array_foreach (external->queue, (GFunc) g_value_array_free, NULL);
       g_ptr_array_free (external->queue, TRUE);
       external->queue = NULL;
     }



More information about the Xfce4-commits mailing list