Fix a few of mem leaks. [Backported from old gnome-system-monitor]