HAL service discovery : fix a memory leak