fix torrent download memory leak bug