From e60ed80754f1f51c74bc338cc3a81d12f49d9687 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 16 Jul 2010 18:23:55 -0400 Subject: s3-auth: Simplify how we free the auth_context Turn the freeing function into a destructor and attach it to the auth_context. Make all callers TALLOC_FREE() the auth_context instead of calling the free function. Signed-off-by: Andrew Bartlett --- source3/smbd/sesssetup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/smbd/sesssetup.c') diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 52fcd282a66..525bcafd096 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -150,14 +150,14 @@ static NTSTATUS check_guest_password(struct auth_serversupplied_info **server_in } if (!make_user_info_guest(&user_info)) { - (auth_context->free)(&auth_context); + TALLOC_FREE(auth_context); return NT_STATUS_NO_MEMORY; } nt_status = auth_context->check_ntlm_password(auth_context, user_info, server_info); - (auth_context->free)(&auth_context); + TALLOC_FREE(auth_context); free_user_info(&user_info); return nt_status; } @@ -1751,8 +1751,7 @@ void reply_sesssetup_and_X(struct smb_request *req) user_info, &server_info); - (plaintext_auth_context->free)( - &plaintext_auth_context); + TALLOC_FREE(plaintext_auth_context); } } } -- cgit v1.2.1