Ignore:
Timestamp:
Sep 10, 2007, 2:42:38 PM (15 years ago)
Author:
charles
Message:

free more memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/encryption/libtransmission/peer-io.c

    r3025 r3027  
    9999**/
    100100
     101//static int total_io = 0;
     102
    101103static tr_peerIo*
    102104tr_peerIoNew( struct tr_handle  * handle,
     
    108110    tr_peerIo * c;
    109111    c = tr_new0( tr_peerIo, 1 );
     112//fprintf( stderr, "peer-io: created %p; count is now %d\n", c, ++total_io );
    110113    c->crypto = tr_cryptoNew( torrentHash, isIncoming );
    111114    c->handle = handle;
     
    165168    if( c != NULL )
    166169    {
     170        c->canRead = NULL;
     171        c->didWrite = NULL;
     172        c->gotError = NULL;
    167173        tr_bufferevent_free( c->handle, c->bufev );
    168 fprintf( stderr, "io %p destroying rate to client %p to peer %p\n", c, c->rateToClient, c->rateToPeer );
     174        tr_netClose( c->socket );
     175
    169176        tr_rcClose( c->rateToClient );
    170177        tr_rcClose( c->rateToPeer );
    171         tr_netClose( c->socket );
     178
    172179        tr_cryptoFree( c->crypto );
     180
    173181        tr_free( c );
     182
     183//fprintf( stderr, "peer-io: freeing %p; count is now %d\n", c, --total_io );
    174184    }
    175185}
Note: See TracChangeset for help on using the changeset viewer.