[PATCH 6.12 074/826] thermal: testing: Use DEFINE_FREE() and __free() to simplify code