[PATCH 5.4 29/66] EDAC/mc: Fix use-after-free and memleaks during device removal