tests: replace free_all() usage with g_auto