diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 966dc08a2..c06cbd744 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -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;