Web Automation: -[_WKAutomationSession init] leaks
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 18:29:40 +0000 (18:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Sep 2017 18:29:40 +0000 (18:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176268

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-02
Reviewed by Darin Adler.

* UIProcess/API/Cocoa/_WKAutomationSession.mm:
(-[_WKAutomationSession init]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/_WKAutomationSession.mm

index 7ae9a89..94af1be 100644 (file)
@@ -1,3 +1,13 @@
+2017-09-02  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Automation: -[_WKAutomationSession init] leaks
+        https://bugs.webkit.org/show_bug.cgi?id=176268
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/Cocoa/_WKAutomationSession.mm:
+        (-[_WKAutomationSession init]):
+
 2017-09-02  Tim Horton  <timothy_horton@apple.com>
 
         Fix some style issues in the Web Process part of the Remote Layer Tree code
index 70ddd41..b400fae 100644 (file)
@@ -43,7 +43,7 @@
 
 - (instancetype)init
 {
-    return [self initWithConfiguration:[_WKAutomationSessionConfiguration new]];
+    return [self initWithConfiguration:[[[_WKAutomationSessionConfiguration alloc] init] autorelease]];
 }
 
 - (instancetype)initWithConfiguration:(_WKAutomationSessionConfiguration *)configuration