From 68b531e81784d218b598e4ec403443bbc039ca77 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 7 May 2007 15:19:53 +0000 Subject: r22748: fix memleaks by passing an mem_ctx to irpc_servers_byname() metze (This used to be commit b54584dfabee77ec7743cab431bda9765057a295) --- source4/auth/auth_winbind.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/auth/auth_winbind.c') diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c index 2a35047e21..05183d65d0 100644 --- a/source4/auth/auth_winbind.c +++ b/source4/auth/auth_winbind.c @@ -162,7 +162,10 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, const struct auth_usersupplied_info *user_info_new; struct netr_IdentityInfo *identity_info; - winbind_servers = irpc_servers_byname(ctx->auth_ctx->msg_ctx, "winbind_server"); + s = talloc(mem_ctx, struct winbind_check_password_state); + NT_STATUS_HAVE_NO_MEMORY(s); + + winbind_servers = irpc_servers_byname(ctx->auth_ctx->msg_ctx, s, "winbind_server"); if ((winbind_servers == NULL) || (winbind_servers[0].id == 0)) { DEBUG(0, ("Winbind authentication for [%s]\\[%s] failed, " "no winbind_server running!\n", @@ -170,9 +173,6 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, return NT_STATUS_NO_LOGON_SERVERS; } - s = talloc(mem_ctx, struct winbind_check_password_state); - NT_STATUS_HAVE_NO_MEMORY(s); - if (user_info->flags & USER_INFO_INTERACTIVE_LOGON) { struct netr_PasswordInfo *password_info; -- cgit