(trunk libT) fix a potential (but currently unused) code path in tr_torrentNew() that could cause a memory leak. Thanks to Elbandi for pointing this out.
This commit is contained in:
parent
2421798dd9
commit
6407e38df7
|
@ -781,12 +781,13 @@ tr_torrentNew( const tr_ctor * ctor, int * setmeError )
|
|||
}
|
||||
torrentInit( tor, ctor );
|
||||
}
|
||||
else if( setmeError )
|
||||
else
|
||||
{
|
||||
if( r == TR_PARSE_DUPLICATE )
|
||||
tr_metainfoFree( &tmpInfo );
|
||||
|
||||
*setmeError = r;
|
||||
if( setmeError )
|
||||
*setmeError = r;
|
||||
}
|
||||
|
||||
return tor;
|
||||
|
|
Loading…
Reference in New Issue