GNOME Bugzilla – Bug 770306
Fix memory leaks
Last modified: 2016-09-22 20:48:07 UTC
The following patches fixes the memory leaks found when running Nautilus with Valgrind.
Created attachment 334041 [details] [review] file: fix memory leak in nautilus_file_is_remote
Created attachment 334042 [details] [review] window-slot: don't leak new selection list
Created attachment 334043 [details] [review] canvas-view-container: free attribute quark list
Created attachment 334044 [details] [review] query-editor: destroy the search tags on finalize
Created attachment 334045 [details] [review] files-view: release selection list
Created attachment 334046 [details] [review] search-popover: unref date time when row is destroyed
Created attachment 334047 [details] [review] bookmark-list: free file content after use
Review of attachment 334041 [details] [review]: Here is a very good place to use g_autofree to avoid all of those temporary vars.
Review of attachment 334042 [details] [review]: If you want to use it, you need to copy it, that's the pattern we usually follow. This one will nautilus crash actually, it's freed in one of the callers. There is probably a leak somewhere, but this is not the fix.
Review of attachment 334043 [details] [review]: yep!
Review of attachment 334044 [details] [review]: oh yeah, how did we miss this one? :( thanks!
Review of attachment 334045 [details] [review]: LGTM
Review of attachment 334046 [details] [review]: oh yeah
Review of attachment 334047 [details] [review]: yeah
ping here? some need work and some need rebase
Created attachment 336093 [details] [review] file: fix memory leak in nautilus_file_is_remote Rebased.
Created attachment 336094 [details] [review] canvas-view-container: free attribute quark list Rebased.
Created attachment 336095 [details] [review] query-editor: destroy the search tags on finalize Rebased.
Created attachment 336096 [details] [review] files-view: release selection list Rebased.
Created attachment 336097 [details] [review] search-popover: unref date time when row is destroyed Rebased.
Created attachment 336098 [details] [review] bookmark-list: free file content after use Rebased.
Review of attachment 336093 [details] [review]: Y
Review of attachment 336094 [details] [review]: E
Review of attachment 336095 [details] [review]: S
Review of attachment 336096 [details] [review]: Yep
Review of attachment 336097 [details] [review]: +1
Review of attachment 336098 [details] [review]: yeah
Attachment 336093 [details] pushed as 7ed23ba - file: fix memory leak in nautilus_file_is_remote Attachment 336094 [details] pushed as 1c9559f - canvas-view-container: free attribute quark list Attachment 336095 [details] pushed as 3fb1491 - query-editor: destroy the search tags on finalize Attachment 336096 [details] pushed as 2f928bd - files-view: release selection list Attachment 336097 [details] pushed as 27d4951 - search-popover: unref date time when row is destroyed Attachment 336098 [details] pushed as cc24600 - bookmark-list: free file content after use