From 893e93a41f10e44e908bc0e3c20fb350affa9c4f Mon Sep 17 00:00:00 2001 From: "ivanpe@chromium.org" Date: Sat, 20 Jun 2015 00:32:37 +0000 Subject: Use local variable for out parameter rather than direct use of ivar - Resolves spurious static analyzer warning about response_ being potentially leaked due to the retain in Xcode 6.3 and later. I'm submitting this on behalf of Brian Moore. R=qsr@chromium.org Review URL: https://codereview.chromium.org/1171693007 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1460 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/mac/HTTPMultipartUpload.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common/mac') diff --git a/src/common/mac/HTTPMultipartUpload.m b/src/common/mac/HTTPMultipartUpload.m index 29fa040b..2ed1b632 100644 --- a/src/common/mac/HTTPMultipartUpload.m +++ b/src/common/mac/HTTPMultipartUpload.m @@ -195,10 +195,11 @@ if ([[req URL] isFileURL]) { [[req HTTPBody] writeToURL:[req URL] options:0 error:error]; } else { + NSURLResponse *response = nil; data = [NSURLConnection sendSynchronousRequest:req - returningResponse:&response_ + returningResponse:&response error:error]; - [response_ retain]; + response_ = (NSHTTPURLResponse *)[response retain]; } [req release]; -- cgit v1.2.1