gtkfilesel.c: Memory leaks...



Hi!

It seems to be a memory-leak in gtkfilesel.c, the leaking 
memory is allocated in gtk_file_selection_populate() at 
the line:
filename = g_strdup (cmpl_this_completion (poss));

This filename is then sent to gtk_clist_append() which 
makes a copy of the string which it will free when the 
clist is freed (gtkclist.c:cell_empty()).
But then the string is sent to gtk_clist_set_row_data() 
which just save:s the pointer to the data so we can't free
it untill the list is to be freed.
The problem is that the cell_empty() function doesn't know
that this pointer should be freed so it just leaves it
unreferenced.

/Mattias Grönlund



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]