WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21827
Memory leak in webkit_web_view_load_string
https://bugs.webkit.org/show_bug.cgi?id=21827
Summary
Memory leak in webkit_web_view_load_string
Michael Tross
Reported
2008-10-23 03:12:36 PDT
The Gtk method webkit_web_view_load_string() takes a string as gchar* argument to set the page content. This string is passed down to a SharedBuffer, but duplicated before with strdup(), this memory is lost (verified with valgrind). void webkit_web_view_load_string(WebKitWebView* webView, const gchar* content, const gchar* contentMimeType, const gchar* contentEncoding, const { .... RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(strdup(content), strlen(content)); SubstituteData substituteData(sharedBuffer.release(), contentMimeType ? String(contentMimeType) : "text/html", contentEncoding ? String(conte .... }
Attachments
Patch to fix memory leak in webkit_web_view_load_string()
(740 bytes, patch)
2008-10-23 03:13 PDT
,
Michael Tross
no flags
Details
Formatted Diff
Diff
Patch to fix memory leak in webkit_web_view_load_string()
(1.35 KB, patch)
2008-10-24 04:44 PDT
,
Michael Tross
alp
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Michael Tross
Comment 1
2008-10-23 03:13:42 PDT
Created
attachment 24595
[details]
Patch to fix memory leak in webkit_web_view_load_string()
Mark Rowe (bdash)
Comment 2
2008-10-23 13:34:58 PDT
This looks fine, but the patch needs a ChangeLog entry. Can you please add one, and upload the new patch? Be sure to set the "review" flag on the attachment to "?" when you upload the patch to indicate that you'd like it reviewed!
Michael Tross
Comment 3
2008-10-24 04:44:01 PDT
Created
attachment 24638
[details]
Patch to fix memory leak in webkit_web_view_load_string() added ChangeLog entry and requested review
Alp Toker
Comment 4
2008-10-24 09:28:28 PDT
Comment on
attachment 24638
[details]
Patch to fix memory leak in webkit_web_view_load_string() r=me
Jan Alonzo
Comment 5
2008-10-27 14:46:33 PDT
Landed in
r37903
. Cheers.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug