Skip to content

Commit cbc44f4

Browse files
committed
CSHARP-980:fixed issue with Kerberos corrupting managed memory.
1 parent 324c97d commit cbc44f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ private static int GetMaxTokenSize()
415415
{
416416
try
417417
{
418-
Win32.FreeContextBuffer(ref array);
418+
Win32.FreeContextBuffer(array);
419419
}
420420
catch
421421
{ }

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

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

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

0 commit comments

Comments
 (0)