mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
fix a possible crash on shutdown
This commit is contained in:
parent
d360607a02
commit
e20a5cf3df
1 changed files with 5 additions and 2 deletions
|
@ -368,8 +368,11 @@ tr_closeImpl( void * vh )
|
|||
tr_sharedShuttingDown( h->shared );
|
||||
tr_trackerShuttingDown( h );
|
||||
|
||||
for( t=h->torrentList; t!=NULL; t=t->next )
|
||||
tr_torrentClose( t );
|
||||
for( t=h->torrentList; t!=NULL; ) {
|
||||
tr_torrent * tmp = t;
|
||||
t = t->next;
|
||||
tr_torrentClose( tmp );
|
||||
}
|
||||
|
||||
tr_peerMgrFree( h->peerMgr );
|
||||
|
||||
|
|
Loading…
Reference in a new issue