gsettings: free group_names after use
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 17 Apr 2018 06:07:41 +0000 (09:07 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 19 Apr 2018 11:45:25 +0000 (14:45 +0300)
src/modules/gsettings/gsettings-helper.c

index 120456b3a35af1efd1f7396c620d0e29a7de3431..d59cc832d4546ecd6c0d8b630b72d20d8b182718 100644 (file)
@@ -114,6 +114,11 @@ int main(int argc, char *argv[]) {
     g_main_loop_unref(g);
 
     g_ptr_array_unref(groups);
+
+    /* group_names can't be freed earlier, because the values are being used as
+     * the user_data for module_group_callback(). */
+    g_strfreev(group_names);
+
     g_object_unref(G_OBJECT(settings));
 
     return 0;