refactor: avoid unnecessary heap alloc when sending magnet link over RPC (#3535)
This commit is contained in:
parent
d8d03b8e3b
commit
88e898b005
|
@ -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 New Issue