diff --git a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java b/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java
index <HASH>..<HASH> 100644
--- a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java
+++ b/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java
@@ -591,7 +591,8 @@ willPerformHTTPRedirection:(NSHTTPURLResponse *)response
 
       for (CFIndex i = 0; i < count; i++) {
         SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
-        NSData* remoteCertificateData = (__bridge NSData *) SecCertificateCopyData(certificate);
+        NSData* remoteCertificateData =
+            [(NSData *) SecCertificateCopyData(certificate) autorelease];
         IOSByteArray* rawCert = [IOSByteArray arrayWithNSData:remoteCertificateData];
         [securityDataHandler_ handleSecCertificateDataWithByteArray:rawCert];
       }
Fixes memory leak in IosHttpURLConnection - copied object wasn't being
released. Also, __bridge isn't needed because it only applies to ARC.