1
0
Fork 0
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:
Charles Kerr 2008-02-13 01:33:29 +00:00
parent d360607a02
commit e20a5cf3df

View file

@ -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 );