[gtk+] applicationwindow: fix mem leak



commit 2d820defef9a74dd20466f4d829ce008cad84abb
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Jan 20 13:52:47 2013 -0500

    applicationwindow: fix mem leak
    
    In the error path, code is leaking a ref to a GVariant.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692203

 gtk/gtkapplicationwindow.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 2a9215a..271054b 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -471,6 +471,10 @@ add_accel_closure (gpointer         data,
 
       gtk_accel_group_connect_by_path (window->priv->accels, accel_path, &closure->closure);
     }
+  else if (parameter)
+    {
+      g_variant_unref (parameter);
+    }
 
   g_free (action_name);
 }



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