Changeset 5636


Ignore:
Timestamp:
Apr 17, 2008, 7:54:22 PM (14 years ago)
Author:
charles
Message:

fix a couple more minor leaks

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/dialogs.c

    r5596 r5636  
    153153        tr_core_remove_torrent( data->core, l->data, data->delete_files );
    154154    g_slist_free( data->torrents );
     155    data->torrents = NULL;
    155156}
    156157
     
    167168
    168169    gtk_widget_destroy( GTK_WIDGET( dialog ) );
     170    g_slist_free( data->torrents );
    169171    g_free( data );
    170172}
  • trunk/gtk/makemeta-ui.c

    r5536 r5636  
    4545freeMetaUI( gpointer p )
    4646{
    47     MakeMetaUI * ui = (MakeMetaUI *) p;
     47    MakeMetaUI * ui = p;
    4848    tr_metaInfoBuilderFree( ui->builder );
    4949    memset( ui, ~0, sizeof(MakeMetaUI) );
  • trunk/libtransmission/makemeta.c

    r5585 r5636  
    168168tr_metaInfoBuilderFree( tr_metainfo_builder * builder )
    169169{
    170     if( builder != NULL )
     170    if( builder )
    171171    {
    172172        uint32_t i;
     
    483483    tr_lock * lock;
    484484
     485    /* free any variables from a previous run */
     486    tr_free( builder->announce );
     487    tr_free( builder->comment );
     488    tr_free( builder->outputFile );
     489
     490    /* initialize the builder variables */
    485491    builder->abortFlag = 0;
    486492    builder->isDone = 0;
  • trunk/libtransmission/platform.c

    r5576 r5636  
    475475}
    476476
    477 
    478477const char *
    479478tr_getTorrentDir( const tr_handle * handle )
  • trunk/libtransmission/session.c

    r5635 r5636  
    416416tr_close( tr_handle * h )
    417417{
     418    int i;
    418419    const int maxwait_msec = SHUTDOWN_MAX_SECONDS * 1000;
    419420    const uint64_t deadline = tr_date( ) + maxwait_msec;
     
    431432    tr_fdClose( );
    432433    tr_lockFree( h->lock );
     434    for( i=0; i<h->metainfoLookupCount; ++i )
     435        tr_free( h->metainfoLookup[i].filename );
     436    tr_free( h->metainfoLookup );
    433437    tr_free( h->tag );
    434438    tr_free( h->configDir );
Note: See TracChangeset for help on using the changeset viewer.