Commit 1982d3cd authored by mrowe@apple.com's avatar mrowe@apple.com

Fix leaks seen after loading <http://www.funnyordie.com/videos/d70b5a11cb>.

Reviewed by Darin Adler.

* Misc/WebNSDataExtras.m:
(-[NSString _web_capitalizeRFC822HeaderFieldName]): Transfer ownerhip of the allocated buffers
to the new CFString so that they will be freed when no longer needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9e518102
2008-01-26 Mark Rowe <mrowe@apple.com>
Reviewed by Darin Adler.
Fix leaks seen after loading <http://www.funnyordie.com/videos/d70b5a11cb>.
* Misc/WebNSDataExtras.m:
(-[NSString _web_capitalizeRFC822HeaderFieldName]): Transfer ownerhip of the allocated buffers
to the new CFString so that they will be freed when no longer needed.
2008-01-26 Greg Bolsinga <bolsinga@apple.com>
<rdar://problem/5708388> WebDashboardRegion.h duplicated between WebCore / WebKit
......
......@@ -92,10 +92,10 @@ -(NSString *)_web_capitalizeRFC822HeaderFieldName
}
if (somethingChanged) {
if (useUniCharPtr) {
result = (NSString *)CFMakeCollectable(CFStringCreateWithCharacters(NULL, uniCharPtr, len));
result = (NSString *)CFMakeCollectable(CFStringCreateWithCharactersNoCopy(NULL, uniCharPtr, len, NULL));
}
else {
result = (NSString *)CFMakeCollectable(CFStringCreateWithCString(NULL, charPtr, kCFStringEncodingISOLatin1));
result = (NSString *)CFMakeCollectable(CFStringCreateWithCStringNoCopy(NULL, charPtr, kCFStringEncodingISOLatin1, NULL));
}
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment