Changeset 2116


Ignore:
Timestamp:
Jun 17, 2007, 4:18:09 AM (15 years ago)
Author:
charles
Message:

put a NULL ptr check in tr_metaBuilderFree()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/file_selection/libtransmission/makemeta.c

    r2114 r2116  
    191191tr_metaInfoBuilderFree( tr_metainfo_builder_t * builder )
    192192{
    193     size_t i;
    194 
    195     for( i=0; i<builder->fileCount; ++i )
    196         tr_free( builder->files[i] );
    197     tr_free( builder->files );
    198     tr_free( builder->fileLengths );
    199     tr_free( builder->top );
    200     tr_free( builder->comment );
    201     tr_free( builder->announce );
    202     tr_free( builder->outputFile );
    203     tr_free( builder );
     193    if( builder != NULL )
     194    {
     195        size_t i;
     196        for( i=0; i<builder->fileCount; ++i )
     197            tr_free( builder->files[i] );
     198        tr_free( builder->files );
     199        tr_free( builder->fileLengths );
     200        tr_free( builder->top );
     201        tr_free( builder->comment );
     202        tr_free( builder->announce );
     203        tr_free( builder->outputFile );
     204        tr_free( builder );
     205    }
    204206}
    205207
Note: See TracChangeset for help on using the changeset viewer.