Changeset 5011


Ignore:
Timestamp:
Feb 13, 2008, 1:22:55 AM (14 years ago)
Author:
charles
Message:

fix a possible crash when deleting a torrent.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r4996 r5011  
    970970    tr_globalLock( tor->handle );
    971971
     972    tr_ioRecheckRemove( tor );
    972973    tr_torrentUncheck( tor );
    973974    tr_ioRecheckAdd( tor, torrentRecheckDoneCB );
     
    10241025    if( tor != NULL )
    10251026    {
    1026         tr_globalLock( tor->handle );
     1027        tr_handle * handle = tor->handle;
     1028        tr_globalLock( handle );
    10271029
    10281030        tr_torrentClearStatusCallback( tor );
    1029         tr_runInEventThread( tor->handle, closeTorrent, tor );
    1030 
    1031         tr_globalUnlock( tor->handle );
     1031        tr_runInEventThread( handle, closeTorrent, tor );
     1032
     1033        tr_globalUnlock( handle );
    10321034    }
    10331035}
  • trunk/libtransmission/utils.c

    r4840 r5011  
    6969    {
    7070        const char * str = getenv( "TR_DEBUG_FD" );
    71         int fd;
     71        int fd = 0;
    7272        if( str && *str )
    7373            fd = atoi( str );
Note: See TracChangeset for help on using the changeset viewer.