[PATCH 5.10 042/162] regulator: core: fix UAF in destroy_regulator()