Changeset 13203


Ignore:
Timestamp:
Feb 4, 2012, 3:09:31 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) fix minor memory leak of the 'dir' string when deleting local data. (Thanks, valgrind!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r13080 r13203  
    28342834    for( f=0; f<tor->info.fileCount; ++f )
    28352835    {
    2836         char * dir;
    2837         char * filename;
    2838 
    28392836        /* get the directory that this file goes in... */
    2840         filename = tr_buildPath( top, tor->info.files[f].name, NULL );
    2841         dir = tr_dirname( filename );
    2842         tr_free( filename );
     2837        char * filename = tr_buildPath( top, tor->info.files[f].name, NULL );
     2838        char * dir = tr_dirname( filename );
    28432839        if( !tr_is_same_file( top, dir ) && strcmp( top, dir ) ) {
    28442840            for( ;; ) {
     
    28542850            }
    28552851        }
     2852        tr_free( dir );
     2853        tr_free( filename );
    28562854    }
    28572855    for( i=0, n=tr_ptrArraySize(&folders); i<n; ++i )
Note: See TracChangeset for help on using the changeset viewer.