[PATCH openEuler-5.10-LTS 043/168] driver: base: fix UAF when driver_attach failed