Changeset 2219


Ignore:
Timestamp:
Jun 28, 2007, 2:02:30 AM (15 years ago)
Author:
charles
Message:

make it safe to pass a bzero()ed struct into tr_metainfoFree()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r2207 r2219  
    286286    int ii, jj;
    287287
    288     free( inf->pieces );
    289     free( inf->files );
     288    tr_free( inf->pieces );
     289    tr_free( inf->files );
    290290   
    291291    for( ii = 0; ii < inf->trackerTiers; ii++ )
     
    293293        for( jj = 0; jj < inf->trackerList[ii].count; jj++ )
    294294        {
    295             free( inf->trackerList[ii].list[jj].address );
    296             free( inf->trackerList[ii].list[jj].announce );
    297             free( inf->trackerList[ii].list[jj].scrape );
    298         }
    299         free( inf->trackerList[ii].list );
    300     }
    301     free( inf->trackerList );
     295            tr_free( inf->trackerList[ii].list[jj].address );
     296            tr_free( inf->trackerList[ii].list[jj].announce );
     297            tr_free( inf->trackerList[ii].list[jj].scrape );
     298        }
     299        tr_free( inf->trackerList[ii].list );
     300    }
     301    tr_free( inf->trackerList );
    302302}
    303303
Note: See TracChangeset for help on using the changeset viewer.