[webkit-reviews] review granted: [Bug 187174] [Linux] Fix memory leak in WTF::forEachLine() : [Attachment 343904] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jul 1 23:08:43 PDT 2018
Zan Dobersek <zan at falconsigh.net> has granted Alicia Boya García
<aboya at igalia.com>'s request for review:
Bug 187174: [Linux] Fix memory leak in WTF::forEachLine()
https://bugs.webkit.org/show_bug.cgi?id=187174
Attachment 343904: Patch
https://bugs.webkit.org/attachment.cgi?id=343904&action=review
--- Comment #5 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 343904
--> https://bugs.webkit.org/attachment.cgi?id=343904
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=343904&action=review
>>> Source/WTF/wtf/linux/MemoryFootprintLinux.cpp:43
>>> while (getline(&buffer, &size, file) != -1) {
>>
>> We should get the size of the line string here (lineLength = getline(...)),
since “size” is the length of the allocated buffer.
>
> Actually, size is never read in the functor, it's an unused argument.
Please remove it before landing.
More information about the webkit-reviews
mailing list