[System]: Fix major AppleTls memory leak. Bug #56814. (#5370)
authorMartin Baulig <mabaul@microsoft.com>
Tue, 15 Aug 2017 17:00:18 +0000 (13:00 -0400)
committerGitHub <noreply@github.com>
Tue, 15 Aug 2017 17:00:18 +0000 (13:00 -0400)
mcs/class/System/Mono.AppleTls/AppleTlsContext.cs

index 563e35f01d15e9f6583699ec2273c4a641919b82..bb42f79e6ee38fc1979c95963c16e77771fc57d3 100644 (file)
@@ -664,7 +664,7 @@ namespace Mono.AppleTls
                                if (value == IntPtr.Zero)
                                        throw new TlsException (AlertDescription.CertificateUnknown);
                        }
-                       return (value == IntPtr.Zero) ? null : new SecTrust (value);
+                       return (value == IntPtr.Zero) ? null : new SecTrust (value, true);
                }
 
                #endregion