[PATCH OLK-5.10] stm class: Fix a double free in stm_register_device()