[iotcon] fix build error at some destory api. void -> int (native ACR-764)