[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
ddkilzer at apple.com
ddkilzer at apple.com
Wed Dec 22 15:01:32 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 86859517213a4a65fb03f5c91a56d506a979f345
Author: ddkilzer at apple.com <ddkilzer at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 15:43:31 2010 +0000
2010-10-27 David Kilzer <ddkilzer at apple.com>
Fix leak of CFMutableDictionaryRef in createXMLStringFromWebArchiveData()
Reviewed by Adam Roben.
Follow-up fix for: <https://bugs.webkit.org/show_bug.cgi?id=48278>
* DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
(createXMLStringFromWebArchiveData): Use RetainPtr<> to fix a
leak introduced in r70613.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7d92969..0179bb3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-27 David Kilzer <ddkilzer at apple.com>
+
+ Fix leak of CFMutableDictionaryRef in createXMLStringFromWebArchiveData()
+
+ Reviewed by Adam Roben.
+
+ Follow-up fix for: <https://bugs.webkit.org/show_bug.cgi?id=48278>
+
+ * DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
+ (createXMLStringFromWebArchiveData): Use RetainPtr<> to fix a
+ leak introduced in r70613.
+
2010-10-27 Gabor Rapcsanyi <rgabor at inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
diff --git a/WebKitTools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp b/WebKitTools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
index 2409282..4d77454 100644
--- a/WebKitTools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
+++ b/WebKitTools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
@@ -161,10 +161,10 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
CFIndex bytesCount = CFDataGetLength(webArchiveData);
RetainPtr<CFReadStreamRef> readStream(AdoptCF, CFReadStreamCreateWithBytesNoCopy(kCFAllocatorDefault, CFDataGetBytePtr(webArchiveData), bytesCount, kCFAllocatorNull));
CFReadStreamOpen(readStream.get());
- CFMutableDictionaryRef propertyList = (CFMutableDictionaryRef)CFPropertyListCreateFromStream(kCFAllocatorDefault, readStream.get(), bytesCount, kCFPropertyListMutableContainersAndLeaves, &format, 0);
+ RetainPtr<CFMutableDictionaryRef> propertyList(AdoptCF, (CFMutableDictionaryRef)CFPropertyListCreateFromStream(kCFAllocatorDefault, readStream.get(), bytesCount, kCFPropertyListMutableContainersAndLeaves, &format, 0));
CFReadStreamClose(readStream.get());
#else
- CFMutableDictionaryRef propertyList = (CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error);
+ RetainPtr<CFMutableDictionaryRef> propertyList(AdoptCF, (CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error));
#endif
if (!propertyList) {
@@ -174,7 +174,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
}
RetainPtr<CFMutableArrayRef> resources(AdoptCF, CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
- CFArrayAppendValue(resources.get(), propertyList);
+ CFArrayAppendValue(resources.get(), propertyList.get());
while (CFArrayGetCount(resources.get())) {
RetainPtr<CFMutableDictionaryRef> resourcePropertyList = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(resources.get(), 0);
@@ -208,9 +208,9 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
error = 0;
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
- RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateXMLData(kCFAllocatorDefault, propertyList));
+ RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateXMLData(kCFAllocatorDefault, propertyList.get()));
#else
- RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateData(kCFAllocatorDefault, propertyList, kCFPropertyListXMLFormat_v1_0, 0, &error));
+ RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
#endif
if (!xmlData) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list