Skip to content

Commit e0b7a6b

Browse files
lukefromdcraveit65
authored andcommitted
daemon: fix a memory leak
1 parent 763db9d commit e0b7a6b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

mate-settings-daemon/mate-settings-manager.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,22 @@ is_schema (const char *schema)
174174
GSettingsSchemaSource *source = NULL;
175175
gchar **non_relocatable = NULL;
176176
gchar **relocatable = NULL;
177+
gboolean in_schema;
177178

178179
source = g_settings_schema_source_get_default ();
179180
if (!source)
180181
return FALSE;
181182

182183
g_settings_schema_source_list_schemas (source, TRUE, &non_relocatable, &relocatable);
183184

184-
return (is_item_in_schema (non_relocatable, schema) ||
185+
in_schema = (is_item_in_schema (non_relocatable, schema) ||
185186
is_item_in_schema (relocatable, schema));
187+
188+
189+
g_strfreev (non_relocatable);
190+
g_strfreev (relocatable);
191+
192+
return in_schema;
186193
}
187194

188195
static void

0 commit comments

Comments
 (0)