hal: Add clear_devices to avoid memory leakage

In case of device update, it will alloc memory for new device,
Add the corresponding clear_devices to avoid the memory leakage.

Change-Id: If8498bad04146f383073e521a7d74fe20564f880
4 files changed