1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

pam: Fix CID 1034870 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2015-03-03 16:11:26 +01:00 committed by Ralph Böhme
parent de1bf29d25
commit ad3e38f6bb

View File

@ -2436,6 +2436,7 @@ static char* winbind_upn_to_username(struct pwb_context *ctx,
char *domain = NULL;
char *name;
char *p;
char *result;
/* This cannot work when the winbind separator = @ */
@ -2467,7 +2468,9 @@ static char* winbind_upn_to_username(struct pwb_context *ctx,
return NULL;
}
return talloc_asprintf(ctx, "%s%c%s", domain, sep, name);
result = talloc_asprintf(ctx, "%s%c%s", domain, sep, name);
wbcFreeMemory(domain);
return result;
}
static int _pam_delete_cred(pam_handle_t *pamh, int flags,