Factor out msg_create/free and use g_slist_free_full as appropriate. https://bugzilla.gnome.org/show_bug.cgi?id=647278