From 193d68cc5c8db25784dd414cc995ed3085f0e2bf Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Fri, 9 Dec 2016 21:56:22 +0300 Subject: [PATCH] Move tr_metainfoFree call higher per review comment --- libtransmission/torrent-magnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libtransmission/torrent-magnet.c b/libtransmission/torrent-magnet.c index fc606c1d4..99780e20b 100644 --- a/libtransmission/torrent-magnet.c +++ b/libtransmission/torrent-magnet.c @@ -294,6 +294,7 @@ tr_torrentSetMetadataPiece (tr_torrent * tor, int piece, const void * data, in if (success && !tr_getBlockSize (info.pieceSize)) { tr_torrentSetLocalError (tor, "%s", _("Magnet torrent's metadata is not usable")); + tr_metainfoFree (&info); success = false; } @@ -308,8 +309,6 @@ tr_torrentSetMetadataPiece (tr_torrent * tor, int piece, const void * data, in tr_sessionSetTorrentFile (tor->session, tor->info.hashString, tor->info.torrent); tr_torrentGotNewInfoDict (tor); tr_torrentSetDirty (tor); - }else{ - tr_metainfoFree(&info); } tr_variantFree (&newMetainfo); -- 2.40.0