Remove uneeded explicit frees in detail_free