GNOME Bugzilla – Bug 677720
[patch] bunch of memory leaks
Last modified: 2012-06-12 09:32:36 UTC
Let's fix them
Created attachment 215979 [details] [review] 0001-ephy-profile-utils-fix-memory-leak.patch
Created attachment 215980 [details] [review] 0002-ephy-bookmark-action-fix-memory-leak.patch
Created attachment 215981 [details] [review] 0003-ephy-bookmarks-fix-memory-leaks.patch
Created attachment 215982 [details] [review] 0004-ephy-web-view-fix-GList-leak.patch
Created attachment 215983 [details] [review] 0005-ephy-session-fix-memory-leak-in-ephy_session_save.patch
Created attachment 215984 [details] [review] 0006-ephy-completion-model-fix-GList-of-EphyHistoryURL-le.patch
Created attachment 216099 [details] [review] 0007-ephy-bookmarks-editor-fix-memory-leak.patch
Created attachment 216100 [details] [review] 0008-ephy-bookmarks-editor-fix-GList-leaks.patch
Review of attachment 215979 [details] [review]: Good catch.
Review of attachment 215980 [details] [review]: LRTM
Review of attachment 215981 [details] [review]: Maybe you can merge it with the previous one, but otherwise looks right.
Review of attachment 215982 [details] [review]: Looks about right, too.
Review of attachment 215983 [details] [review]: ::: src/ephy-session.c @@ -650,1 @@ EphyEmbed *embed) This is actually write_tab(), not ephy_session_save(), the comment is wrong, can you review that please? @@ +665,3 @@ } ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "url", + (const xmlChar *) (fake_address ? fake_address : address)); Why not just freeing fake_address right here rather than at the end?
Review of attachment 215984 [details] [review]: Seems about right!
Review of attachment 216099 [details] [review]: ::: src/bookmarks/ephy-bookmarks-editor.c @@ +1473,3 @@ + return result; +} + To me this really looks like a deficience in the WK IconDatabase API, since there's no way to find out if a favicon exists for an url without allocating a string. I think I'll file a bug in wk about this. Meanwhile I think this patch will do.
Review of attachment 216100 [details] [review]: Another good catch.
(In reply to comment #10) > LRTM What does this mean?
Created attachment 216134 [details] [review] 0005-ephy-session-fix-memory-leak-in-write_tab.patch > the comment is wrong Fixed > Why not just freeing fake_address right here rather than at the end? Thanks, I missed this.
(In reply to comment #18) > (In reply to comment #10) > > LRTM > Looks right to me :) Do you have a git account or should I push them for you?
(In reply to comment #20) > Do you have a git account or should I push them for you? I don't have git account, please commit.
I changed the variable name in the last patch, fake_address didn't sound very good. Other than that, I pushed all the patches. Thank you!