| Summary: | [GTK] Memory leak from webkit_web_policy_decision_new() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Milan Crha <mcrha> | ||||
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cgarcia, commit-queue, tpopela | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Milan Crha
2015-02-13 07:21:21 PST
Created attachment 246642 [details]
proposed patch
The problem is that the priv->framePolicyFunction is not properly freed on GObject's finalize(), because it's a class inside a strucutre which is freed by GLib, not by C++.
This is WebKit1 related, I didn't find webkit_web_policy_decision_new() in the git master, but as it's still relevant, then it'll be nice to have this fixed there.
It would be also good to check WebKit2 code, whether it doesn't contain any similar issues.
Attachment 246642 [details] did not pass style-queue:
Total errors found: 0 in 0 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 246642 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=246642&action=review Do not ask cq+ for wk1 patches since they will never apply in trunk. > webkitgtk-2.4.8/Source/WebKit/gtk/webkit/webkitwebpolicydecision.cpp:53 > + decision->priv->framePolicyFunction = 0; This should use nullptr instead of 0, I'll fix this before merging the patch in 2.4 branch. Committed: <http://trac.webkit.org/changeset/182469> |