Plug leak in jsValueWithDictionaryInContext().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jan 2015 20:57:36 +0000 (20:57 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jan 2015 20:57:36 +0000 (20:57 +0000)
<https://webkit.org/b/140889>

Reviewed by Alexey Proskuryakov.

Add a missing JSStringRelease to plug leak that was showing up on leaks bot.

* platform/mac/SerializedPlatformRepresentationMac.mm:
(WebCore::jsValueWithDictionaryInContext):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm

index 8771093..7db051a 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-26  Andreas Kling  <akling@apple.com>
+
+        Plug leak in jsValueWithDictionaryInContext().
+        <https://webkit.org/b/140889>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Add a missing JSStringRelease to plug leak that was showing up on leaks bot.
+
+        * platform/mac/SerializedPlatformRepresentationMac.mm:
+        (WebCore::jsValueWithDictionaryInContext):
+
 2015-01-26  Benjamin Poulain  <benjamin@webkit.org>
 
         Fix CSS Selector's tag name matching when mixing HTML and XML
index a6760aa..5cce2ac 100644 (file)
@@ -196,6 +196,7 @@ static JSValue *jsValueWithDictionaryInContext(NSDictionary *dictionary, JSConte
 
         JSStringRef name = JSStringCreateWithCFString((CFStringRef)key);
         JSObjectSetProperty([context JSGlobalContextRef], resultObject, name, [value JSValueRef], 0, &exception);
+        JSStringRelease(name);
         if (exception)
             continue;
     }