]> granicus.if.org Git - transmission/commitdiff
(trunk libT) fix memory leak when trying to add duplicate torrents. thanks valgrind!
authorCharles Kerr <charles@transmissionbt.com>
Fri, 12 Feb 2010 04:13:51 +0000 (04:13 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 12 Feb 2010 04:13:51 +0000 (04:13 +0000)
libtransmission/torrent.c

index 390b5330f69cc3b0733e1414f1a5972ad971739d..8db82c54c214c2081867b2409ec7204a1495cd6d 100644 (file)
@@ -783,6 +783,9 @@ tr_torrentNew( const tr_ctor * ctor, int * setmeError )
     }
     else if( setmeError )
     {
+        if( r == TR_PARSE_DUPLICATE )
+            tr_metainfoFree( &tmpInfo );
+
         *setmeError = r;
     }