Title: [184004] trunk/Source/WebKit2
Revision
184004
Author
[email protected]
Date
2015-05-08 12:07:01 -0700 (Fri, 08 May 2015)

Log Message

Fix ProcessLauncher port leak
https://bugs.webkit.org/show_bug.cgi?id=144807
rdar://problem/20593291

Reviewed by Sam Weinig.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
xpc_dictionary_set_mach_send increments the send right count so make sure to
balance it with a call to mach_port_deallocate.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (184003 => 184004)


--- trunk/Source/WebKit2/ChangeLog	2015-05-08 19:01:03 UTC (rev 184003)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-08 19:07:01 UTC (rev 184004)
@@ -1,3 +1,16 @@
+2015-05-08  Anders Carlsson  <[email protected]>
+
+        Fix ProcessLauncher port leak
+        https://bugs.webkit.org/show_bug.cgi?id=144807
+        rdar://problem/20593291
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::connectToService):
+        xpc_dictionary_set_mach_send increments the send right count so make sure to
+        balance it with a call to mach_port_deallocate.
+
 2015-05-08  Beth Dakin  <[email protected]>
 
         Fix performance tests after r183954

Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (184003 => 184004)


--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2015-05-08 19:01:03 UTC (rev 184003)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2015-05-08 19:07:01 UTC (rev 184004)
@@ -257,7 +257,10 @@
     auto bootstrapMessage = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0));
     xpc_dictionary_set_string(bootstrapMessage.get(), "message-name", "bootstrap");
     xpc_dictionary_set_string(bootstrapMessage.get(), "framework-executable-path", [[[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] executablePath] fileSystemRepresentation]);
+
     xpc_dictionary_set_mach_send(bootstrapMessage.get(), "server-port", listeningPort);
+    mach_port_deallocate(mach_task_self(), listeningPort);
+
     xpc_dictionary_set_string(bootstrapMessage.get(), "client-identifier", clientIdentifier.data());
     xpc_dictionary_set_string(bootstrapMessage.get(), "ui-process-name", [[[NSProcessInfo processInfo] processName] UTF8String]);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to