Fixed memory leak with download_address and upload_address in main