Fix invalid read when changing foreground color
Valgrind trace
Invalid read of size 4
at 0x543AC14: pango_attr_list_copy (pango-attributes.c:1943)
by 0x4B9B114: _g_type_boxed_copy (gtype.c:4426)
by 0x4B72F98: g_boxed_copy (gboxed.c:343)
by 0x4B731B7: g_value_dup_boxed (gboxed.c:446)
by 0x137966: xfdesktop_cell_renderer_icon_label_set_property (xfdesktop-cell-renderer-icon-label.c:290)
by 0x4B79596: object_set_property (gobject.c:2172)
by 0x4B7DD20: g_object_set_valist (gobject.c:3141)
by 0x4B7E723: g_object_set (gobject.c:3317)
by 0x141152: xfdesktop_icon_view_set_use_icon_label_fg_color (xfdesktop-icon-view.c:5049)
by 0x141D76: xfdesktop_icon_view_set_property (xfdesktop-icon-view.c:1212)
by 0x4B79596: object_set_property (gobject.c:2172)
by 0x4B7D7DE: g_object_setv (gobject.c:3083)
by 0x4B7E877: g_object_set_property (gobject.c:3383)
by 0x567688A: xfconf_g_property_channel_notify (xfconf-binding.c:365)
by 0x567D0DF: _xfconf_marshal_VOID__STRING_BOXED (xfconf-marshal.c:121)
by 0x4B74D17: g_closure_invoke (gclosure.c:833)
by 0x4B87F3B: signal_emit_unlocked_R (gsignal.c:3887)
by 0x4B895FE: signal_emit_valist_unlocked (gsignal.c:3519)
by 0x4B90C7A: g_signal_emit_valist (gsignal.c:3262)
by 0x4B90D24: g_signal_emit (gsignal.c:3582)
by 0x5678D30: xfconf_channel_property_changed (xfconf-channel.c:406)
by 0x567D062: _xfconf_marshal_VOID__STRING_STRING_BOXED (xfconf-marshal.c:83)
by 0x4B74D17: g_closure_invoke (gclosure.c:833)
by 0x4B87F3B: signal_emit_unlocked_R (gsignal.c:3887)
by 0x4B895FE: signal_emit_valist_unlocked (gsignal.c:3519)
by 0x4B90C7A: g_signal_emit_valist (gsignal.c:3262)
by 0x4B90D24: g_signal_emit (gsignal.c:3582)
by 0x5678251: xfconf_cache_handle_property_changed (xfconf-cache.c:531)
by 0x5678251: xfconf_cache_proxy_signal_received_cb (xfconf-cache.c:588)
by 0x48DFD15: _g_cclosure_marshal_VOID__STRING_STRING_VARIANT (gmarshal-internal.c:2302)
by 0x4B74D17: g_closure_invoke (gclosure.c:833)
Address 0x36a408e588cbbe08 is not stack'd, malloc'd or (recently) free'd
Testing
- No issues were detected with Valgrind when testing the patch
- I verified that I can set and clear a foreground color