projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3109b7c
)
[System]: Fix memory leak in BTLS. (#5291)
author
Martin Baulig
<mabaul@microsoft.com>
Tue, 1 Aug 2017 16:59:23 +0000
(12:59 -0400)
committer
GitHub
<noreply@github.com>
Tue, 1 Aug 2017 16:59:23 +0000
(12:59 -0400)
mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
patch
|
blob
|
history
diff --git
a/mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
b/mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
index b9c83ae438392869f42fe267116e5190ea429c35..29bfb5bbfd1afeab1d6fa49fc47521ba48804562 100644
(file)
--- a/
mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
+++ b/
mcs/class/System/Mono.Btls/X509CertificateImplBtls.cs
@@
-303,6
+303,8
@@
namespace Mono.Btls
return PKCS8.PrivateKeyInfo.DecodeRSA (bytes);
}
set {
+ if (nativePrivateKey != null)
+ nativePrivateKey.Dispose ();
nativePrivateKey = null;
FallbackImpl.PrivateKey = value;
}
@@
-490,6
+492,7
@@
namespace Mono.Btls
x509 = null;
}
if (nativePrivateKey != null) {
+ nativePrivateKey.Dispose ();
nativePrivateKey = null;
}
subjectName = null;