memory leak found in recv thread