Bug 231817

Summary: REGRESSION (r282230): WebKit::registerScheduledActivityHandler() leaks an xpc_object_t
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebXRAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: achristensen, cdumez, ews-watchlist, jiewen_tan, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231819
Bug Depends on: 230052    
Bug Blocks:    
Attachments:
Description Flags
Patch v1
none
Patch v2 none

David Kilzer (:ddkilzer)
Reported 2021-10-15 10:34:57 PDT
WebKit::registerScheduledActivityHandler() leaks an xpc_object_t. Found by the clang static analyzer. Regressed here: Add PrivateClickMeasurement daemon <https://bugs.webkit.org/show_bug.cgi?id=230052> <https://trac.webkit.org/282230>
Attachments
Patch v1 (2.58 KB, patch)
2021-10-15 10:38 PDT, David Kilzer (:ddkilzer)
no flags
Patch v2 (1.94 KB, patch)
2021-10-15 12:10 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2021-10-15 10:36:19 PDT
Radar WebKit Bug Importer
Comment 2 2021-10-15 10:36:40 PDT
David Kilzer (:ddkilzer)
Comment 3 2021-10-15 10:38:29 PDT
Created attachment 441400 [details] Patch v1
David Kilzer (:ddkilzer)
Comment 4 2021-10-15 12:09:30 PDT
Comment on attachment 441400 [details] Patch v1 Wrong patch!
David Kilzer (:ddkilzer)
Comment 5 2021-10-15 12:10:54 PDT
Created attachment 441413 [details] Patch v2
David Kilzer (:ddkilzer)
Comment 6 2021-10-15 12:12:02 PDT
Comment on attachment 441413 [details] Patch v2 Looks like I need to update. Maybe this was fixed already?
David Kilzer (:ddkilzer)
Comment 7 2021-10-15 12:14:20 PDT
Fixed by Bug 231309 using adoptNS. ¯\_(ツ)_/¯ *** This bug has been marked as a duplicate of bug 231309 ***
David Kilzer (:ddkilzer)
Comment 8 2021-10-15 12:20:47 PDT
(In reply to David Kilzer (:ddkilzer) from comment #7) > Fixed by Bug 231309 using adoptNS. ¯\_(ツ)_/¯ To be clear, adoptNS() should work fine with xpc_object_t in Cocoa source files.
Note You need to log in before you can comment on or make changes to this bug.