<rdar://problem/11238965> Leak in Plugin Process when launched 32-bit
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 00:21:10 +0000 (00:21 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 00:21:10 +0000 (00:21 +0000)
Reviewed by Jessie Berlin.

* PluginProcess/mac/PluginProcessMainMac.mm:
(WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one.

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

Source/WebKit2/ChangeLog
Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm

index 877c306..48542dd 100644 (file)
@@ -1,3 +1,12 @@
+2012-04-16  Brady Eidson  <beidson@apple.com>
+
+        <rdar://problem/11238965> Leak in Plugin Process when launched 32-bit
+
+        Reviewed by Jessie Berlin.
+
+        * PluginProcess/mac/PluginProcessMainMac.mm:
+        (WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one.
+
 2012-04-16  Anders Carlsson  <andersca@apple.com>
 
         Nightly Back/Forward no longer calls plug-in's NPP_NewStream
index e6b394c..eee5644 100644 (file)
@@ -89,8 +89,9 @@ int PluginProcessMain(const CommandLine& commandLine)
         WKSetDefaultLocalization(cfLocalization.get());
 
 #if defined(__i386__)
-    NSDictionary *defaults = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:@"AppleMagnifiedMode"];
+    NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil];
     [[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
+    [defaults release];
 #endif
 
 #if !SHOW_CRASH_REPORTER