On 2/23/06, Colossus <[EMAIL PROTECTED]> wrote: > Gaurav Jain wrote: > > All your "filenames" can be retrieved and freed by looping through the list: > > Something like: > > GSList *next_ptr = Files_to_Add; > > while (next_ptr != NULL) > > { > > g_free(next_ptr->data); //this frees the filenames > > next_ptr = g_slist_next(next_ptr); > > } > > g_slist_free(Files_to_Add); //this frees the list > > > > Hum, what about using directly Files_to_Add instead of next_ptr ?
you must pass the list's head node pointer to g_slist_free(), which you will lost if you use Files_to_Add directly (in fact, it will always be null after the while loop) _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list