Fix leaks in settings_list_sessions_open_key_file
Leak report
120 (72 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 8,744 of 10,061
at 0x484BC13: calloc (vg_replace_malloc.c:1675)
by 0x57516B5: g_malloc0 (gmem.c:133)
by 0x574244F: g_key_file_new (gkeyfile.c:694)
by 0x136129: settings_list_sessions_open_key_file (xfsm-util.c:266)
by 0x12C6ED: xfsm_manager_load_session (xfsm-manager.c:511)
by 0x12CB2C: xfsm_manager_load_settings (xfsm-manager.c:798)
by 0x12CB2C: xfsm_manager_load (xfsm-manager.c:834)
[...snip...]
42 (16 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 5,313 of 10,061
at 0x48447A8: malloc (vg_replace_malloc.c:446)
by 0x5751661: g_malloc (gmem.c:100)
by 0x57697DB: g_slice_alloc (gslice.c:193)
by 0x57697EC: g_slice_alloc0 (gslice.c:217)
by 0x5733A23: g_error_allocate (gerror.c:235)
by 0x5733A23: g_error_new_steal (gerror.c:249)
by 0x573409F: g_error_new_literal (gerror.c:347)
by 0x5734555: g_set_error_literal (gerror.c:527)
by 0x57425AF: g_key_file_load_from_file (gkeyfile.c:920)
by 0x136140: settings_list_sessions_open_key_file (xfsm-util.c:267)
by 0x12C6ED: xfsm_manager_load_session (xfsm-manager.c:511)
by 0x12CB2C: xfsm_manager_load_settings (xfsm-manager.c:798)
by 0x12CB2C: xfsm_manager_load (xfsm-manager.c:834)
[...snip...]
Steps to reproduce
- Delete session data from
~/.cache/sessions
- Sign in
Testing
- No issues were detected when testing the patch with Valgrind