(libT) fix a small pex memory leak

This commit is contained in:
Charles Kerr 2008-12-01 05:57:59 +00:00
parent 37414ea274
commit a588eaddc8
1 changed files with 5 additions and 1 deletions

View File

@ -1791,7 +1791,11 @@ sendPex( tr_peermsgs * msgs )
"pex: old peer count %d, new peer count %d, added %d, removed %d",
msgs->pexCount, newCount, diffs.addedCount, diffs.droppedCount );
if( diffs.addedCount || diffs.droppedCount )
if( !diffs.addedCount && !diffs.droppedCount )
{
tr_free( diffs.elements );
}
else
{
int i;
tr_benc val;