After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770306 - Fix memory leaks
Fix memory leaks
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-23 22:55 UTC by Georges Basile Stavracas Neto
Modified: 2016-09-22 20:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file: fix memory leak in nautilus_file_is_remote (1.07 KB, patch)
2016-08-23 22:55 UTC, Georges Basile Stavracas Neto
none Details | Review
window-slot: don't leak new selection list (902 bytes, patch)
2016-08-23 22:55 UTC, Georges Basile Stavracas Neto
rejected Details | Review
canvas-view-container: free attribute quark list (776 bytes, patch)
2016-08-23 22:55 UTC, Georges Basile Stavracas Neto
none Details | Review
query-editor: destroy the search tags on finalize (1.61 KB, patch)
2016-08-23 22:55 UTC, Georges Basile Stavracas Neto
none Details | Review
files-view: release selection list (746 bytes, patch)
2016-08-23 22:56 UTC, Georges Basile Stavracas Neto
none Details | Review
search-popover: unref date time when row is destroyed (1.18 KB, patch)
2016-08-23 22:56 UTC, Georges Basile Stavracas Neto
none Details | Review
bookmark-list: free file content after use (696 bytes, patch)
2016-08-23 22:56 UTC, Georges Basile Stavracas Neto
none Details | Review
file: fix memory leak in nautilus_file_is_remote (763 bytes, patch)
2016-09-22 16:46 UTC, Georges Basile Stavracas Neto
committed Details | Review
canvas-view-container: free attribute quark list (791 bytes, patch)
2016-09-22 16:46 UTC, Georges Basile Stavracas Neto
committed Details | Review
query-editor: destroy the search tags on finalize (1.45 KB, patch)
2016-09-22 16:46 UTC, Georges Basile Stavracas Neto
committed Details | Review
files-view: release selection list (731 bytes, patch)
2016-09-22 16:47 UTC, Georges Basile Stavracas Neto
committed Details | Review
search-popover: unref date time when row is destroyed (1.20 KB, patch)
2016-09-22 16:47 UTC, Georges Basile Stavracas Neto
committed Details | Review
bookmark-list: free file content after use (704 bytes, patch)
2016-09-22 16:47 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Georges Basile Stavracas Neto 2016-08-23 22:55:23 UTC
The following patches fixes the memory leaks found when running Nautilus with Valgrind.
Comment 1 Georges Basile Stavracas Neto 2016-08-23 22:55:29 UTC
Created attachment 334041 [details] [review]
file: fix memory leak in nautilus_file_is_remote
Comment 2 Georges Basile Stavracas Neto 2016-08-23 22:55:36 UTC
Created attachment 334042 [details] [review]
window-slot: don't leak new selection list
Comment 3 Georges Basile Stavracas Neto 2016-08-23 22:55:44 UTC
Created attachment 334043 [details] [review]
canvas-view-container: free attribute quark list
Comment 4 Georges Basile Stavracas Neto 2016-08-23 22:55:55 UTC
Created attachment 334044 [details] [review]
query-editor: destroy the search tags on finalize
Comment 5 Georges Basile Stavracas Neto 2016-08-23 22:56:02 UTC
Created attachment 334045 [details] [review]
files-view: release selection list
Comment 6 Georges Basile Stavracas Neto 2016-08-23 22:56:09 UTC
Created attachment 334046 [details] [review]
search-popover: unref date time when row is destroyed
Comment 7 Georges Basile Stavracas Neto 2016-08-23 22:56:15 UTC
Created attachment 334047 [details] [review]
bookmark-list: free file content after use
Comment 8 Carlos Soriano 2016-08-30 15:28:22 UTC
Review of attachment 334041 [details] [review]:

Here is a very good place to use g_autofree to avoid all of those temporary vars.
Comment 9 Carlos Soriano 2016-08-30 15:29:30 UTC
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.
Comment 10 Carlos Soriano 2016-08-30 15:31:25 UTC
Review of attachment 334043 [details] [review]:

yep!
Comment 11 Carlos Soriano 2016-08-30 15:32:23 UTC
Review of attachment 334044 [details] [review]:

oh yeah, how did we miss this one? :( thanks!
Comment 12 Carlos Soriano 2016-08-30 15:33:51 UTC
Review of attachment 334045 [details] [review]:

LGTM
Comment 13 Carlos Soriano 2016-08-30 15:34:24 UTC
Review of attachment 334046 [details] [review]:

oh yeah
Comment 14 Carlos Soriano 2016-08-30 15:35:47 UTC
Review of attachment 334047 [details] [review]:

yeah
Comment 15 Carlos Soriano 2016-09-22 09:40:24 UTC
ping here? some need work and some need rebase
Comment 16 Georges Basile Stavracas Neto 2016-09-22 16:46:31 UTC
Created attachment 336093 [details] [review]
file: fix memory leak in nautilus_file_is_remote

Rebased.
Comment 17 Georges Basile Stavracas Neto 2016-09-22 16:46:41 UTC
Created attachment 336094 [details] [review]
canvas-view-container: free attribute quark list

Rebased.
Comment 18 Georges Basile Stavracas Neto 2016-09-22 16:46:53 UTC
Created attachment 336095 [details] [review]
query-editor: destroy the search tags on finalize

Rebased.
Comment 19 Georges Basile Stavracas Neto 2016-09-22 16:47:07 UTC
Created attachment 336096 [details] [review]
files-view: release selection list

Rebased.
Comment 20 Georges Basile Stavracas Neto 2016-09-22 16:47:16 UTC
Created attachment 336097 [details] [review]
search-popover: unref date time when row is destroyed

Rebased.
Comment 21 Georges Basile Stavracas Neto 2016-09-22 16:47:27 UTC
Created attachment 336098 [details] [review]
bookmark-list: free file content after use

Rebased.
Comment 22 Carlos Soriano 2016-09-22 20:29:19 UTC
Review of attachment 336093 [details] [review]:

Y
Comment 23 Carlos Soriano 2016-09-22 20:29:37 UTC
Review of attachment 336094 [details] [review]:

E
Comment 24 Carlos Soriano 2016-09-22 20:30:05 UTC
Review of attachment 336095 [details] [review]:

S
Comment 25 Carlos Soriano 2016-09-22 20:31:02 UTC
Review of attachment 336096 [details] [review]:

Yep
Comment 26 Carlos Soriano 2016-09-22 20:31:26 UTC
Review of attachment 336097 [details] [review]:

+1
Comment 27 Carlos Soriano 2016-09-22 20:32:25 UTC
Review of attachment 336098 [details] [review]:

yeah
Comment 28 Georges Basile Stavracas Neto 2016-09-22 20:47:29 UTC
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