fix a possible crash on shutdown
This commit is contained in:
parent
d360607a02
commit
e20a5cf3df
|
@ -368,8 +368,11 @@ tr_closeImpl( void * vh )
|
||||||
tr_sharedShuttingDown( h->shared );
|
tr_sharedShuttingDown( h->shared );
|
||||||
tr_trackerShuttingDown( h );
|
tr_trackerShuttingDown( h );
|
||||||
|
|
||||||
for( t=h->torrentList; t!=NULL; t=t->next )
|
for( t=h->torrentList; t!=NULL; ) {
|
||||||
tr_torrentClose( t );
|
tr_torrent * tmp = t;
|
||||||
|
t = t->next;
|
||||||
|
tr_torrentClose( tmp );
|
||||||
|
}
|
||||||
|
|
||||||
tr_peerMgrFree( h->peerMgr );
|
tr_peerMgrFree( h->peerMgr );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue