[PATCH OLK-6.6 390/717] stm class: Fix a double free in stm_register_device()