Fix string leak in get_device_icon_name
Leak report
25 bytes in 1 blocks are definitely lost in loss record 2,511 of 8,465
at 0x48447A8: malloc (vg_replace_malloc.c:446)
by 0x5441661: g_malloc (gmem.c:100)
by 0x545ADD3: g_strdup (gstrfuncs.c:323)
by 0x53C3A26: g_strdup_inline (gstrfuncs.h:321)
by 0x53C3A26: value_lcopy_string (gvaluetypes.c:315)
by 0x53A249C: g_object_get_valist (gobject.c:3271)
by 0x53A281B: g_object_get (gobject.c:3366)
by 0x70D2CCC: get_device_icon_name (xfpm-power-common.c:200)
by 0x70CF6D9: power_manager_button_update_device_icon_and_details (power-manager-button.c:477)
by 0x70CFC92: power_manager_button_add_device (power-manager-button.c:603)
by 0x70D038D: power_manager_button_add_all_devices (power-manager-button.c:715)
by 0x70D038D: power_manager_button_show (power-manager-button.c:1216)
by 0x70CDA05: power_manager_plugin_new (xfce-power-manager-plugin.c:244)
by 0x70CDA05: power_manager_plugin_construct (xfce-power-manager-plugin.c:265)
[...snip...]
Testing
- No issues were detected when testing the patch with Valgrind