Changeset 9755


Ignore:
Timestamp:
Dec 14, 2009, 4:41:49 PM (12 years ago)
Author:
charles
Message:

(trunk gtk) #2668 "small memory leak in getSelectedTorrentIds()" -- fixed for 1.80

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r9688 r9755  
    135135    GtkTreeModel * model;
    136136    GSList * ids = NULL;
    137     GList * selrows = NULL;
     137    GList * paths = NULL;
    138138    GList * l;
    139139
    140140    /* build a list of the selected torrents' ids */
    141141    s = tr_window_get_selection( data->wind );
    142     for( selrows=l=gtk_tree_selection_get_selected_rows(s,&model); l; l=l->next ) {
     142    for( paths=l=gtk_tree_selection_get_selected_rows(s,&model); l; l=l->next ) {
    143143        GtkTreeIter iter;
    144144        if( gtk_tree_model_get_iter( model, &iter, l->data ) ) {
     
    149149    }
    150150
     151    /* cleanup */
     152    g_list_foreach( paths, (GFunc)gtk_tree_path_free, NULL );
     153    g_list_free( paths );
    151154    return ids;
    152155}
Note: See TracChangeset for help on using the changeset viewer.