mirror of
https://github.com/transmission/transmission
synced 2025-01-02 13:05:08 +00:00
refactor: avoid unnecessary heap alloc when sending magnet link over RPC (#3535)
This commit is contained in:
parent
d8d03b8e3b
commit
88e898b005
1 changed files with 1 additions and 3 deletions
|
@ -626,9 +626,7 @@ static void initField(tr_torrent const* const tor, tr_stat const* const st, tr_v
|
|||
break;
|
||||
|
||||
case TR_KEY_magnetLink:
|
||||
str = tr_torrentGetMagnetLink(tor);
|
||||
tr_variantInitStr(initme, str);
|
||||
tr_free(str);
|
||||
tr_variantInitStr(initme, tor->metainfo_.magnet());
|
||||
break;
|
||||
|
||||
case TR_KEY_metadataPercentComplete:
|
||||
|
|
Loading…
Reference in a new issue