Bug 130048 - Fix three leaks
Summary: Fix three leaks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-10 15:57 PDT by Simon Fraser (smfr)
Modified: 2014-03-10 16:49 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.63 KB, patch)
2014-03-10 15:59 PDT, Simon Fraser (smfr)
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2014-03-10 15:57:54 PDT
Fix three leaks
Comment 1 Simon Fraser (smfr) 2014-03-10 15:59:07 PDT
Created attachment 226346 [details]
Patch
Comment 2 Anders Carlsson 2014-03-10 15:59:53 PDT
Comment on attachment 226346 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=226346&action=review

> Source/WebCore/page/ios/UserAgentIOS.mm:47
> +    RetainPtr<NSDictionary> systemInfo = adoptNS([[NSDictionary alloc] initWithContentsOfFile:[platformSystemRootDirectory() stringByAppendingPathComponent:@"System/Library/CoreServices/SystemVersion.plist"]]);

Can just use auto systemInfo =.
Comment 3 Simon Fraser (smfr) 2014-03-10 16:03:31 PDT
https://trac.webkit.org/r165412
Comment 4 Joseph Pecoraro 2014-03-10 16:49:16 PDT
Comment on attachment 226346 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=226346&action=review

> Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm:512
> +    return [result autorelease];

Shouldn't this also release result in the NSException raise cases if the alloc succeeded? Could the autorelease move up to line 500?