RESOLVED FIXED Bug 124401
[EFL] Leak in ewk_frame_certificate_status_get()
https://bugs.webkit.org/show_bug.cgi?id=124401
Summary [EFL] Leak in ewk_frame_certificate_status_get()
Alberto Garcia
Reported 2013-11-15 02:17:52 PST
I just stumbled upon this piece of code in ewk_frame.cpp: SoupMessage* soupMessage = documentLoader->request().toSoupMessage(); That object is not being freed.
Attachments
Patch (1.53 KB, patch)
2013-11-15 02:20 PST, Alberto Garcia
eflews.bot: commit-queue-
Patch (1.68 KB, patch)
2013-11-15 02:46 PST, Alberto Garcia
no flags
Patch (1.51 KB, patch)
2013-11-15 05:17 PST, Alberto Garcia
cgarcia: review+
Alberto Garcia
Comment 1 2013-11-15 02:20:03 PST
Created attachment 217030 [details] Patch Here's the patch, it should work fine but note that I don't have a working WebKitEFL environment here to test it.
EFL EWS Bot
Comment 2 2013-11-15 02:23:07 PST
Alberto Garcia
Comment 3 2013-11-15 02:46:27 PST
Created attachment 217033 [details] Patch Right, here's a new version.
Carlos Garcia Campos
Comment 4 2013-11-15 04:51:40 PST
Comment on attachment 217033 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217033&action=review > Source/WebKit/efl/ewk/ewk_frame.cpp:1705 > - SoupMessage* soupMessage = documentLoader->request().toSoupMessage(); > + GRefPtr<SoupMessage> soupMessage(adoptGRef(documentLoader->request().toSoupMessage())); > > - if (soupMessage && (soup_message_get_flags(soupMessage) & SOUP_MESSAGE_CERTIFICATE_TRUSTED)) > + if (soupMessage && (soup_message_get_flags(soupMessage.get()) & SOUP_MESSAGE_CERTIFICATE_TRUSTED)) I think you could even avoid to create the soup message object by simply using if (documentLoader->request().soupMessageFlags() & SOUP_MESSAGE_CERTIFICATE_TRUSTED)
Alberto Garcia
Comment 5 2013-11-15 05:17:35 PST
Created attachment 217043 [details] Patch (In reply to comment #4) > I think you could even avoid to create the soup message object by simply using > > if (documentLoader->request().soupMessageFlags() & SOUP_MESSAGE_CERTIFICATE_TRUSTED) Good point, here's the new patch.
Chris Dumez
Comment 6 2013-11-15 05:19:46 PST
Comment on attachment 217043 [details] Patch LGTM
Alberto Garcia
Comment 7 2013-11-15 06:05:55 PST
Note You need to log in before you can comment on or make changes to this bug.