Bug 232435

Summary: [WPE][Qt] String memory leak in WPEQtView.cpp
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKit APIAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, don.olmstead, mcatanzaro, pnormand, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch don.olmstead: review+

Description Adrian Perez 2021-10-28 07:11:31 PDT
In WPEQtView.cpp currently there is something like this, around line 435:

    variant.setValue(QString(g_strdup(strValue.get())));

Note that the pointer returned by g_strdup() is not freed, and the QString
constructor makes a copy of the string. Not only this makes one uneeded copy,
but also the one done by g_strdup() gets leaked.
Comment 1 Adrian Perez 2021-10-28 07:24:17 PDT
Created attachment 442704 [details]
Patch
Comment 2 EWS 2021-10-28 09:04:56 PDT
Committed r284983 (243630@main): <https://commits.webkit.org/243630@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442704 [details].
Comment 3 Radar WebKit Bug Importer 2021-10-28 09:05:29 PDT
<rdar://problem/84759895>