Changeset 5026


Ignore:
Timestamp:
Feb 13, 2008, 4:30:59 PM (14 years ago)
Author:
charles
Message:

(gtk) fix minor memory leak reported by valgrind

Location:
trunk/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/file-list.c

    r5019 r5026  
    359359
    360360static void
     361torrentDestroyed( gpointer gdata, GObject * deadTorrent UNUSED )
     362{
     363    FileData * data = gdata;
     364    data->gtor = NULL;
     365    file_list_set_torrent( data->top, NULL );
     366}
     367
     368static void
    361369freeData( gpointer gdata )
    362370{
     
    368376    }
    369377
     378    if( data->gtor != NULL )
     379        g_object_weak_unref( G_OBJECT( data->gtor ), torrentDestroyed, data );
     380
    370381    g_free( data );
    371 }
    372 
    373 static void
    374 torrentDestroyed( gpointer gdata, GObject * deadTorrent UNUSED )
    375 {
    376     FileData * data = gdata;
    377     data->gtor = NULL;
    378     file_list_set_torrent( data->top, NULL );
    379382}
    380383
  • trunk/gtk/main.c

    r5017 r5026  
    10661066            gtk_tree_model_get_iter( model, &iter, path );
    10671067            tr_core_delete_torrent( data->core, &iter );
     1068            gtk_tree_path_free( path );
    10681069            gtk_tree_row_reference_free( reference );
    10691070            changed = TRUE;
Note: See TracChangeset for help on using the changeset viewer.