Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
com.apple.WebKit.GPU leaks CMBlockBuffer
https://bugs.webkit.org/show_bug.cgi?id=240267 rdar://92655222 Patch by Jean-Yves Avenard <jean-yves.avenard@apple.com> on 2022-05-09 Reviewed by Jer Noble. * platform/graphics/cocoa/CMUtilities.mm: (WebCore::toCMSampleBuffer): adopt newly created CMBlockBuffer rather than increase the refcount. # Please populate the above commit message. Lines starting # with '#' will be ignored # com.apple.WebKit.GPU leaks CMBlockBuffer # https://bugs.webkit.org/show_bug.cgi?id=240267 # rdar://92655222 # # Reviewed by Jer Noble. # # * platform/graphics/cocoa/CMUtilities.mm: # (WebCore::toCMSampleBuffer): adopt newly created CMBlockBuffer rather than increase the refcount. # On branch bz/240267 # Your branch is ahead of 'origin/main' by 1 commit. # (use "git push" to publish your local commits) # # Changes to be committed: # (use "git restore --staged <file>..." to unstage) # modified: Source/WebCore/ChangeLog # # Please populate the above commit message. Lines starting # with '#' will be ignored # On branch bz/240267 # Your branch is ahead of 'origin/main' by 1 commit. # (use "git push" to publish your local commits) # # nothing to commit, working tree clean Canonical link: https://commits.webkit.org/250440@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
12 additions
and 1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We check
err
here, and if it indicates an error, we don’t look at the value ofrawBlockBuffer
. But ifrawBlockBuffer
is non-null, then I think we have a storage leak. I suggest we don’t even bother looking at the error code, and make our decision entirely based on whetherrawBlockBuffer
is null or not, to make the logic here more obviously correct.