Merge "st-hal: Fix use-after-free in clear_devices"