[webkit-reviews] review granted: [Bug 210646] REGRESSION (r260112): createArchiveList() leaks malloc memory on early returns due to an error : [Attachment 396751] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 17 09:59:04 PDT 2020


Darin Adler <darin at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 210646: REGRESSION (r260112): createArchiveList() leaks malloc memory on
early returns due to an error
https://bugs.webkit.org/show_bug.cgi?id=210646

Attachment 396751: Patch v1

https://bugs.webkit.org/attachment.cgi?id=396751&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 396751
  --> https://bugs.webkit.org/attachment.cgi?id=396751
Patch v1

We should use smart pointers, not raw pointers, so it is harder to make
mistakes like this. We have a MallocPtr template that we could use to work with
straight malloc/free. There’s a little work needed since by default it works
with fastMalloc/fastFree, but it might be worthwhile.


More information about the webkit-reviews mailing list