[Webkit-unassigned] [Bug 21827] New: Memory leak in webkit_web_view_load_string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 23 03:12:37 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=21827

           Summary: Memory leak in webkit_web_view_load_string
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: michael at tross.org


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

    ....
}


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list