RESOLVED FIXED 85886
[GTK] Memory leak in DRT EventSender.cpp
https://bugs.webkit.org/show_bug.cgi?id=85886
Summary [GTK] Memory leak in DRT EventSender.cpp
Sudarsana Nagineni (babu)
Reported 2012-05-08 08:34:40 PDT
Valgrind report a memory leak inside the gdkModifersFromJSValue(). It seems JSString created with JSStringCreateWithUTF8CString needs to be released. ==19010== 240 bytes in 20 blocks are indirectly lost in loss record 10,113 of 11,527 ==19010== at 0x4C2AC27: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19010== by 0x5219944: OpaqueJSString::OpaqueJSString(unsigned short const*, unsigned int) (OpaqueJSString.h:69) ==19010== by 0x5219881: OpaqueJSString::create(unsigned short const*, unsigned int) (OpaqueJSString.h:46) ==19010== by 0x5219581: JSStringCreateWithUTF8CString (JSStringRef.cpp:50) ==19010== by 0x4635E1: gdkModifersFromJSValue(OpaqueJSContext const*, OpaqueJSValue const*) (EventSender.cpp:301) ==19010== by 0x4647DC: createKeyPressEvent(OpaqueJSContext const*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (EventSender.cpp:622) ==19010== by 0x464F30: keyDownCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (EventSender.cpp:760) ==19010== by 0x51FBA93: JSC::JSCallbackFunction::call(JSC::ExecState*) (JSCallbackFunction.cpp:73) ==19010== by 0x53874C9: cti_op_call_NotJSFunction (JITStubs.cpp:2312) ==19010== by 0x5382C7B: JSC::JITThunks::tryCacheGetByID(JSC::ExecState*, JSC::CodeBlock*, JSC::ReturnAddressPtr, JSC::JSValue, JSC::Identifier const&, JSC::PropertySlot const&, JSC::StructureStubInfo*) ==19010== by 0x7FEFFDF8F: ???
Attachments
patch (1.58 KB, patch)
2012-05-08 09:12 PDT, Sudarsana Nagineni (babu)
no flags
Sudarsana Nagineni (babu)
Comment 1 2012-05-08 09:12:04 PDT
Created attachment 140726 [details] patch Fix a memory leak
WebKit Review Bot
Comment 2 2012-05-08 10:14:01 PDT
Comment on attachment 140726 [details] patch Clearing flags on attachment: 140726 Committed r116434: <http://trac.webkit.org/changeset/116434>
WebKit Review Bot
Comment 3 2012-05-08 10:14:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.