GNOME Bugzilla – Bug 323002
items list leaked
Last modified: 2005-12-02 13:06:59 UTC
egg_recent_model_filter leaks the whole list of item since it does while (list) { ... list = list->next; } g_list_free (list); thus freeing NULL
Created attachment 55516 [details] [review] patch the patch is pretty simple, but only lightly tested
I've found it yesterday evening, and was about to commit a patch this morning. Yours is better, though, since it removes that damned while() too, so I'll commit yours right away along with some code clean-ups. Thanks.
we still leak the filtered items: we need a egg_recent_item_unref() on the items that got filtered out.
Created attachment 55519 [details] [review] leak fix this fixes the leak and improves a bit the code readability
2005-12-02 Emmanuele Bassi <ebassi@cvs.gnome.org> * libegg/recent-files/egg-recent-model.c (parse_info_init), (parse_info_new), (end_element_handler): make ParseInfo a dynamically allocated struct instead of passing pointers around. * libegg/recent-files/egg-recent-model.c (egg_recent_model_filter): plug the leakage of the unfiltered item list, and clean up the code a bit (fixes bug #323002, based on a patch by Paolo Borelli).