Ignore:
Timestamp:
Oct 1, 2007, 4:12:24 AM (15 years ago)
Author:
charles
Message:

fix some memory issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r3245 r3247  
    10871087{
    10881088    const Torrent * t = getExistingTorrent( (tr_peerMgr*)manager, torrentHash );
     1089    const int isLocked = torrentIsLocked( t );
    10891090    int i, peerCount;
    1090     const int isLocked = torrentIsLocked( t );
    1091     const tr_peer ** peers = (const tr_peer **) tr_ptrArrayPeek( t->peers, &peerCount );
    1092     tr_pex * pex = tr_new( tr_pex, peerCount );
    1093     tr_pex * walk = pex;
     1091    const tr_peer ** peers;
     1092    tr_pex * pex;
     1093    tr_pex * walk;
    10941094
    10951095    if( !isLocked )
    10961096        torrentLock( (Torrent*)t );
    10971097
    1098     t = getExistingTorrent( (tr_peerMgr*)manager, torrentHash );
    10991098    peers = (const tr_peer **) tr_ptrArrayPeek( t->peers, &peerCount );
    11001099    pex = walk = tr_new( tr_pex, peerCount );
     
    15331532                                + tr_peerIoGetRateToClient( peer->io );
    15341533
     1534        assert( atom != NULL );
     1535
    15351536        /* if we're both seeds, give a little bit of time for
    15361537         * a mutual pex -- peer-msgs initiates a pex exchange
Note: See TracChangeset for help on using the changeset viewer.