button: Fix string leak
Leak report
30 bytes in 1 blocks are definitely lost in loss record 2,682 of 8,819
at 0x48447A8: malloc (vg_replace_malloc.c:446)
by 0x5441661: g_malloc (gmem.c:100)
by 0x70CE810: g_strdup_inline (gstrfuncs.h:317)
by 0x70CE810: power_manager_button_init (power-manager-button.c:998)
by 0x53BC768: g_type_create_instance (gtype.c:1951)
by 0x539EF87: g_object_new_internal (gobject.c:2606)
by 0x53A082D: g_object_new_with_properties (gobject.c:2769)
by 0x53A166E: g_object_new (gobject.c:2415)
by 0x70D0061: power_manager_button_new (power-manager-button.c:1074)
by 0x70CD9EA: power_manager_plugin_new (xfce-power-manager-plugin.c:242)
by 0x70CD9EA: power_manager_plugin_construct (xfce-power-manager-plugin.c:265)
[...snip...]
Testing
- No issues were detected when testing the patch with Valgrind