(trunk libT) fix refcount error in the new peer-io refcount code

This commit is contained in:
Charles Kerr 2009-01-06 03:21:22 +00:00
parent cd7b38e007
commit 73d32850ed
1 changed files with 2 additions and 2 deletions

View File

@ -1258,8 +1258,8 @@ myHandshakeDoneCB( tr_handshake * handshake,
}
peer->port = port;
peer->io = tr_handshakeStealIO( handshake );
tr_peerIoRef( peer->io ); /* balanced by the unref in peerDestructor() */
peer->io = tr_handshakeStealIO( handshake ); /* this steals its refcount too, which is
balanced by our unref in peerDestructor() */
tr_peerIoSetParent( peer->io, t->tor->bandwidth );
tr_peerMsgsNew( t->tor, peer, peerCallbackFunc, t, &peer->msgsTag );