fix NULL-pointer-dereference regression introduced in r13546 for #5069.
This commit is contained in:
parent
6755e4e24f
commit
e1e254d8c2
|
@ -80,9 +80,12 @@ webseed_free( struct tr_webseed * w )
|
|||
const tr_info * inf = tr_torrentInfo( tor );
|
||||
tr_file_index_t i;
|
||||
|
||||
for( i=0; i<inf->fileCount; ++i )
|
||||
tr_free( w->file_urls[i] );
|
||||
tr_free( w->file_urls );
|
||||
/* if we have an array of file URLs, free it */
|
||||
if( w->file_urls != NULL ) {
|
||||
for( i=0; i<inf->fileCount; ++i )
|
||||
tr_free( w->file_urls[i] );
|
||||
tr_free( w->file_urls );
|
||||
}
|
||||
|
||||
/* webseed destruct */
|
||||
event_free( w->timer );
|
||||
|
|
Loading…
Reference in New Issue