Skip to content

Commit f40b821

Browse files
committed
CSHARP-980:fixed issue with Kerberos corrupting managed memory.
1 parent 1fdbe06 commit f40b821

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MongoDB.Driver/Communication/Security/Mechanisms/Sspi/SecurityContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ private static int GetMaxTokenSize()
421421
{
422422
try
423423
{
424-
Win32.FreeContextBuffer(ref array);
424+
Win32.FreeContextBuffer(array);
425425
}
426426
catch
427427
{ }

MongoDB.Driver/Communication/Security/Mechanisms/Sspi/Win32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public static extern uint EncryptMessage(ref SspiHandle context,
247247
/// </remarks>
248248
[DllImport("security.dll", CharSet = CharSet.None)]
249249
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
250-
public static extern uint FreeContextBuffer(ref IntPtr contextBuffer);
250+
public static extern uint FreeContextBuffer(IntPtr contextBuffer);
251251

252252
/// <summary>
253253
/// Frees the credentials handle.

0 commit comments

Comments
 (0)