[pulseaudio-discuss] [PATCH v3 11/12] gsettings: free group_names after use

Tanu Kaskinen tanuk at iki.fi
Tue Apr 17 06:07:41 UTC 2018


---
 src/modules/gsettings/gsettings-helper.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/modules/gsettings/gsettings-helper.c b/src/modules/gsettings/gsettings-helper.c
index ae9dc45eb..142ede94b 100644
--- a/src/modules/gsettings/gsettings-helper.c
+++ b/src/modules/gsettings/gsettings-helper.c
@@ -116,6 +116,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;
-- 
2.16.3



More information about the pulseaudio-discuss mailing list