driver: base: fix UAF when driver_attach failed (CVE-2022-49385) | HOL Guard CVE