]> Pileus Git - ~andy/gtk/commitdiff
applicationwindow: fix mem leak
authorCosimo Cecchi <cosimoc@gnome.org>
Sun, 20 Jan 2013 18:52:47 +0000 (13:52 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 21 Jan 2013 23:47:34 +0000 (18:47 -0500)
In the error path, code is leaking a ref to a GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=692203

gtk/gtkapplicationwindow.c

index 2a9215a4a64f0bde995404595f470836f0622633..271054b109cfa90d98391023e10b7c70b3fabaf8 100644 (file)
@@ -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);
 }