Fix leaks in debug window

Review Request #2304 — Created March 3, 2023 and submitted — Latest diff uploaded

Information

pidgin/pidgin
default

Reviewers

Fixes two leaks from the debug window:

22 bytes in 1 blocks are definitely lost in loss record 7,038 of 41,972
   at 0x484386F: malloc (vg_replace_malloc.c:393)
   by 0x4980168: g_malloc (gmem.c:130)
   by 0x4995602: g_strdup (gstrfuncs.c:363)
   by 0x4CFB782: purple_prefs_connect_callback (prefs.c:1301)
   by 0x48AA524: pidgin_debug_init (pidgindebug.c:918)
   by 0x48B8F9E: pidgin_ui_start (pidginui.c:146)
   by 0x4D37B01: purple_ui_start (purpleui.c:397)
   by 0x4CE3BA6: purple_core_init (core.c:211)
   by 0x48A384F: pidgin_application_startup (pidginapplication.c:820)
   by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
   by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
   by 0x4DD3632: g_signal_emit (gsignal.c:3606)
   by 0x5815B82: g_application_register (gapplication.c:2211)

and

32 bytes in 1 blocks are definitely lost in loss record 15,308 of 41,972
   at 0x484386F: malloc (vg_replace_malloc.c:393)
   by 0x4980168: g_malloc (gmem.c:130)
   by 0x4997AB5: g_slice_alloc (gslice.c:1074)
   by 0x495E14C: UnknownInlinedFun (gdatetime.c:678)
   by 0x495E14C: g_date_time_from_instant (gdatetime.c:774)
   by 0x495F4E9: g_date_time_new_now_local (gdatetime.c:989)
   by 0x48A82F9: save_response_cb (pidgindebug.c:136)
   by 0x4DB4375: g_cclosure_marshal_VOID__INTv (gmarshal.c:596)
   by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
   by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
   by 0x4DD3632: g_signal_emit (gsignal.c:3606)
   by 0x4DB5FBF: g_closure_invoke (gclosure.c:832)
   by 0x4DE3D85: signal_emit_unlocked_R.isra.0 (gsignal.c:3796)
   by 0x4DD3419: g_signal_emit_valist (gsignal.c:3549)

Ran in valgrind, saved the debug logs to a file, and the above leaks were gone.

Commits

Files