Revert "Memory leak fixes"

This reverts commit 7d90221e27fcc72de497f45db4f3ef3c2d623fd6.
Memory leak fixes

This time, with less crashes.
test-menu-spec: Remove g_type_init()