Bug 40873
Summary: | Memory Leak in FileSystemGtk | ||
---|---|---|---|
Product: | WebKit | Reporter: | makefish <openxing> |
Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | berto, mrobinson |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux |
makefish
Memory Leak in WebCore\platform\gtk\FileSystemGtk.cpp.
There are two possiblity leaks in listDirectory.
1,filename
2,pspec
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Martin Robinson
Thanks for reporting this! Can you confirm that this still exists in the latest revision ( http://trac.webkit.org/browser/trunk/WebCore/platform/gtk/FileSystemGtk.cpp )? If you, do you mind elaborating on how this memory may leak.
makefish
Yes,I think the bug still exists in the latest revision,but only 1 place:
The leak place is:
200 if (!dir)
201 return entries;
should be:
if (!dir)
{
if (filename != NULL)
{
g_free(filename);
}
return entries;
}
And because you have added line
211 g_pattern_spec_free(pspec);
GPatternSpec doesn't leak any more.
Alberto Garcia
I think this is already fixed (bug 39494).