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 725890 - Miscellaneous memory fixes
Miscellaneous memory fixes
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: tracker-general
Depends on:
Blocks:
 
 
Reported: 2014-03-07 12:22 UTC by Debarshi Ray
Modified: 2014-03-10 10:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-miner: Do not leak the TrackerSparqlConnection (910 bytes, patch)
2014-03-07 12:25 UTC, Debarshi Ray
committed Details | Review
libtracker-fts: Free the list (1.07 KB, patch)
2014-03-07 12:53 UTC, Debarshi Ray
committed Details | Review
miner-fs: Do not leak the UpDevice (888 bytes, patch)
2014-03-07 13:44 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-03-07 12:22:44 UTC
I received a downstream report about memory leaks found by running dfuzzer [1] against Tracker's services. This is an attempt to narrow them down and fix some of them.

[1] https://github.com/matusmarhefka/dfuzzer
Comment 1 Debarshi Ray 2014-03-07 12:25:05 UTC
Created attachment 271204 [details] [review]
libtracker-miner: Do not leak the TrackerSparqlConnection
Comment 2 Debarshi Ray 2014-03-07 12:53:41 UTC
Created attachment 271214 [details] [review]
libtracker-fts: Free the list
Comment 3 Debarshi Ray 2014-03-07 13:44:49 UTC
Created attachment 271224 [details] [review]
miner-fs: Do not leak the UpDevice
Comment 4 Martyn Russell 2014-03-07 19:25:21 UTC
Comment on attachment 271204 [details] [review]
libtracker-miner: Do not leak the TrackerSparqlConnection

Looks good to me, please commit.
Comment 5 Martyn Russell 2014-03-07 19:33:51 UTC
Comment on attachment 271224 [details] [review]
miner-fs: Do not leak the UpDevice

Looks good to me, please commit :)
Comment 6 Martyn Russell 2014-03-07 19:41:36 UTC
Comment on attachment 271214 [details] [review]
libtracker-fts: Free the list

Looks good to me. I personally hate while() situations where for() is more appropriate ;)

Other than that, I would have gone one further and used GSList* everywhere, less memory and we only need to traverse one way :)

Anyway, thanks for the great patch, I saw this in Valgrind this week and wanted to find time to fix it!
Comment 7 Debarshi Ray 2014-03-10 10:27:58 UTC
Thanks for the reviews, Martyn. I do not have anything more at this point.