From: Volker Lendecke Date: Mon, 16 Dec 2024 16:49:43 +0000 (+0100) Subject: pam_winbind: Fix Bug 15771 X-Git-Tag: samba-4.20.7~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d043ea5e51904ab701d87d93f235dd989a08d6a;p=thirdparty%2Fsamba.git pam_winbind: Fix Bug 15771 Bug: https://bugzilla.samba.org/show_bug.cgi?id=15771 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit 7e8bfe738a3d91b0724d57ed54acf40ebe026c14) Autobuild-User(v4-20-test): Jule Anger Autobuild-Date(v4-20-test): Thu Dec 19 10:40:28 UTC 2024 on atb-devel-224 --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index 5e5cf0af8b8..96e055793d4 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -2525,6 +2525,7 @@ static char* winbind_upn_to_username(struct pwb_context *ctx, /* Convert the UPN to a SID */ wbc_status = wbcCtxLookupName(ctx->wbc_ctx, domain, name, &sid, &type); + TALLOC_FREE(name); if (!WBC_ERROR_IS_OK(wbc_status)) { return NULL; }