Skip to content

Commit 9a6f976

Browse files
cursoragentmyungjoo
andcommitted
Free module list nodes during shutdown
- free the GList container allocated via add_module() during exit_modules() - reset module_head to NULL after g_list_free() to avoid stale pointer reuse - keep module->exit callbacks unchanged while eliminating module list node leak Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: MyungJoo Ham <myungjoo.ham@samsung.com>
1 parent 63abac7 commit 9a6f976

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

daemon/modules.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ exit_modules (void *data)
7878
if (module->exit)
7979
module->exit (data);
8080
}
81+
82+
g_list_free (module_head);
83+
module_head = NULL;
8184
}

0 commit comments

Comments
 (0)