1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-17 05:44:20 +03:00

Tidyup prompted by #6554 - Wrong deallocation in sam_account_ok.

Jeremy.
This commit is contained in:
Jeremy Allison
2009-07-16 09:54:14 -07:00
parent 4a754d029b
commit 74c405db40

View File

@@ -226,10 +226,10 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
if (*workstation_list) {
bool invalid_ws = True;
char *tok;
char *tok = NULL;
const char *s = workstation_list;
char *machine_name = talloc_asprintf(mem_ctx, "%s$", user_info->wksta_name);
const char *machine_name = talloc_asprintf(mem_ctx, "%s$", user_info->wksta_name);
if (machine_name == NULL)
return NT_STATUS_NO_MEMORY;
@@ -251,6 +251,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
TALLOC_FREE(tok);
}
TALLOC_FREE(tok);
TALLOC_FREE(machine_name);
if (invalid_ws)
return NT_STATUS_INVALID_WORKSTATION;