Fix memory leak when accessing torrent info.