Take ownership of the magnet metadata object

Nothing freed the bencode map the meta download built.
This commit is contained in:
noctuum
2026-09-16 18:16:32 +05:00
committed by Jari Sundell
parent 8423803b6e
commit da9606bfae
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ Manager::try_create_download(const std::string& uri, int flags, const command_li
}
void
Manager::try_create_download_from_meta_download(torrent::Object* bencode, const std::string& metafile) {
Manager::try_create_download_from_meta_download(std::unique_ptr<torrent::Object> bencode, const std::string& metafile) {
DownloadFactory* f = new DownloadFactory(this);
f->variables()["tied_to_file"] = (int64_t)true;