Reviewed by Geoff.
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 03:30:05 +0000 (03:30 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2007 03:30:05 +0000 (03:30 +0000)
        Leak fix

        * platform/graphics/mac/MoviePrivateQTKit.mm:
        (WebCore::MoviePrivate::getSupportedTypes):

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

WebCore/ChangeLog
WebCore/platform/graphics/mac/MoviePrivateQTKit.mm

index e26c91df32db4fcfb25c6f202bbfda68a33963a6..d11318a9e14861079beae8c30a6c41fe53da4b2b 100644 (file)
@@ -1,3 +1,12 @@
+2007-10-30  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Geoff.
+
+        Leak fix
+
+        * platform/graphics/mac/MoviePrivateQTKit.mm:
+        (WebCore::MoviePrivate::getSupportedTypes):
+
 2007-10-30  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Stephanie Lewis.
index d8a79cba94f32bf277d4fc3300c70ed7eab21dc7..a52379e4f8a83922e4a9d2a0fa719a613edf7113 100644 (file)
@@ -572,10 +572,12 @@ void MoviePrivate::getSupportedTypes(HashSet<String>& types)
         CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (CFStringRef)ext, NULL);
         if (!uti)
             continue;
-        NSString* mime = (NSString*)UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType);
+        CFStringRef mime = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType);
+        CFRelease(uti);
         if (!mime)
             continue;
-        types.add(String(mime));
+        types.add(String((NSString*)mime));
+        CFRelease(mime);
     }
 }