mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
small memleaks
This commit is contained in:
parent
93cb1c89ad
commit
15fdfda60f
2 changed files with 16 additions and 0 deletions
|
@ -111,6 +111,7 @@ void tr_sharedClose( tr_shared_t * s )
|
|||
tr_natpmpClose( s->natpmp );
|
||||
tr_upnpClose( s->upnp );
|
||||
tr_chokingClose( s->choking );
|
||||
free( s );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -536,9 +536,24 @@ void tr_trackerStopped( tr_tracker_t * tc )
|
|||
void tr_trackerClose( tr_tracker_t * tc )
|
||||
{
|
||||
tr_torrent_t * tor = tc->tor;
|
||||
tr_info_t * inf = &tor->info;
|
||||
tr_announce_list_ptr_t * cur, * curFree;
|
||||
int ii;
|
||||
|
||||
killHttp( &tc->http, tor->fdlimit );
|
||||
killHttp( &tc->httpScrape, tor->fdlimit );
|
||||
|
||||
for( ii = 0; ii < inf->trackerTiers; ii++ )
|
||||
{
|
||||
for( cur = tc->trackerAnnounceListPtr[ii]; cur; )
|
||||
{
|
||||
curFree = cur;
|
||||
cur = cur->nextItem;
|
||||
free( curFree );
|
||||
}
|
||||
}
|
||||
free( tc->trackerAnnounceListPtr );
|
||||
|
||||
free( tc->trackerid );
|
||||
free( tc );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue