Fix leaks in preferences window

Review Request #2303 — Created March 3, 2023 and submitted

Information

pidgin/pidgin
default

Reviewers

This fixes two leaks (of various amounts):

90 bytes in 5 blocks are definitely lost in loss record 27,394 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 0x4DE1EEC: value_lcopy_string.lto_priv.0 (gvaluetypes.c:315)
   by 0x4DC7F13: g_object_get_valist (gobject.c:2893)
   by 0x4DC8243: g_object_get (gobject.c:2988)
   by 0x4CF53A1: purple_media_element_info_get_name (mediamanager.c:2404)
   by 0x48BE32A: populate_vv_device_menuitems (pidginvvprefs.c:87)
   by 0x48BF440: bind_vv_dropdown (pidginvvprefs.c:443)
   by 0x48BF48B: bind_vv_frame (pidginvvprefs.c:454)
   by 0x48BFA7F: pidgin_vv_prefs_init (pidginvvprefs.c:574)
   by 0x4DDF0E7: g_type_create_instance (gtype.c:1931)

121 bytes in 5 blocks are definitely lost in loss record 31,627 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 0x4DE1EEC: value_lcopy_string.lto_priv.0 (gvaluetypes.c:315)
   by 0x4DC7F13: g_object_get_valist (gobject.c:2893)
   by 0x4DC8243: g_object_get (gobject.c:2988)
   by 0x4CF5334: purple_media_element_info_get_id (mediamanager.c:2395)
   by 0x48BE33A: populate_vv_device_menuitems (pidginvvprefs.c:88)
   by 0x48BF440: bind_vv_dropdown (pidginvvprefs.c:443)
   by 0x48BF48B: bind_vv_frame (pidginvvprefs.c:454)
   by 0x48BFA7F: pidgin_vv_prefs_init (pidginvvprefs.c:574)
   by 0x4DDF0E7: g_type_create_instance (gtype.c:1931)

Ran with valgrind, opened the Preferences window, and the leaks were gone.

Summary ID
Fix leaks preferences window
3a3cb8fe493edf5d749da07784f9b011908a3efd
grim
  1. Ship It!
  2. Nice find! Thanks!!

  3. 
      
grim
Review request changed
Status:
Completed