From 17c9ec23a7252c27b2faaa9cbae8e6d9751ba0ee Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 15 May 2004 12:57:05 +0000 Subject: [PATCH] The memory allocated by ConstructTicketRequest is not LSA memory and must be freed with LocalFree(). ticket: 2561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16339 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ChangeLog | 3 ++- src/lib/krb5/ccache/cc_mslsa.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog index aabd2f29a..6d469a50a 100644 --- a/src/lib/krb5/ccache/ChangeLog +++ b/src/lib/krb5/ccache/ChangeLog @@ -3,7 +3,8 @@ * cc_mslsa.c: The FAILED() macro only considered an error to be a failure if the value is negative. ConstructTicketRequest() returns positive errors. Do not use FAILED() to test the result. - Also, fix a potential leak of LSA allocated memory. + Fix a potential leak of LSA allocated memory. Fix a leak of + LocalAlloc memory. 2004-04-24 Ken Raeburn diff --git a/src/lib/krb5/ccache/cc_mslsa.c b/src/lib/krb5/ccache/cc_mslsa.c index 73d6b7096..93a938d82 100644 --- a/src/lib/krb5/ccache/cc_mslsa.c +++ b/src/lib/krb5/ccache/cc_mslsa.c @@ -854,7 +854,7 @@ GetMSTGT(HANDLE LogonHandle, ULONG PackageId,KERB_EXTERNAL_TICKET **ticket) cleanup: if ( pTicketRequest ) - LsaFreeReturnBuffer(pTicketRequest); + LocalFree(pTicketRequest); if (FAILED(Status) || FAILED(SubStatus)) { -- 2.26.2