common: fix some wrong autofree uses
g_autofree an array only g_free the first element, GStrv is the string array type.
This commit is contained in:
parent
70fe645502
commit
a6acc98371
3 changed files with 6 additions and 7 deletions
|
@ -301,7 +301,7 @@ setup_model (CcWindow *shell)
|
|||
g_autofree gchar *name = NULL;
|
||||
g_autofree gchar *description = NULL;
|
||||
g_autofree gchar *id = NULL;
|
||||
g_autofree GStrv keywords = NULL;
|
||||
g_auto(GStrv) keywords = NULL;
|
||||
CcPanelVisibility visibility;
|
||||
const gchar *icon_name = NULL;
|
||||
|
||||
|
@ -512,7 +512,7 @@ gdk_window_set_cb (GObject *object,
|
|||
CcWindow *self)
|
||||
{
|
||||
GdkWindow *window;
|
||||
gchar *str;
|
||||
g_autofree gchar *str = NULL;
|
||||
|
||||
if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
|
||||
return;
|
||||
|
@ -524,7 +524,6 @@ gdk_window_set_cb (GObject *object,
|
|||
|
||||
str = g_strdup_printf ("%u", (guint) GDK_WINDOW_XID (window));
|
||||
g_setenv ("GNOME_CONTROL_CENTER_XID", str, TRUE);
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -616,7 +615,7 @@ split_decorations_cb (GtkSettings *settings,
|
|||
g_autofree gchar *layout = NULL;
|
||||
g_autofree gchar *layout_start = NULL;
|
||||
g_autofree gchar *layout_end = NULL;
|
||||
g_autofree gchar **buttons;
|
||||
g_auto(GStrv) buttons = NULL;
|
||||
|
||||
g_object_get (settings, "gtk-decoration-layout", &layout, NULL);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue