[webkit-changes] [WebKit/WebKit] d2e94b: Fix memory leak in sandbox extension code
Per Arne Vollan
noreply at github.com
Fri Feb 21 15:44:50 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d2e94b018a5a96215b37f681db435b0f99b5e9a1
https://github.com/WebKit/WebKit/commit/d2e94b018a5a96215b37f681db435b0f99b5e9a1
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths:
M Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
M Source/WebKit/Shared/SandboxExtension.h
Log Message:
-----------
Fix memory leak in sandbox extension code
https://bugs.webkit.org/show_bug.cgi?id=288172
rdar://145238621
Reviewed by Chris Dumez.
The function SandboxExtensionImpl::sandboxExtensionForType currently returns a C string that needs to
be deallocated by the caller. Not all callers of this function are deallocating the memory. This patch
addresses this issue by changing the function to return a CString. The caller does no longer have to
deallocate the C string returned from the sandbox functions that issued the extension. The deallocation
of the C string is now done inside the method itself.
* Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
* Source/WebKit/Shared/SandboxExtension.h:
Canonical link: https://commits.webkit.org/290834@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list