HAL_Linux: fixed some valgrind errors
AP_TECS: avoid a valgrind bug