Fix uninitialized memory access of ret variable in async mode