regulator core: fix double-free in regulator_register() error path