This patch resolves multiple memory issues detected by Valgrind. The most important fix is the removal of a use-after-free caused by function notify_icon_name_from_desktop_id(). Then this patch removes several memory leaks, and fixes a potential "(NULL)" showing in the GUI in case of icon cache disk usage failure.
Please merge. Thanks.