diff options
author | Jeremy Allison <jra@samba.org> | 2009-07-16 09:54:14 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-07-16 09:54:14 -0700 |
commit | 74c405db406d0971ba4fe2abae4ebd950d27ab1c (patch) | |
tree | a14d6a5362b3c5f03495758c03a19076974f1c22 /source3 | |
parent | 4a754d029b0eb229b23980aa4a80dae2b485a302 (diff) | |
download | samba-74c405db406d0971ba4fe2abae4ebd950d27ab1c.tar.gz samba-74c405db406d0971ba4fe2abae4ebd950d27ab1c.tar.bz2 samba-74c405db406d0971ba4fe2abae4ebd950d27ab1c.zip |
Tidyup prompted by #6554 - Wrong deallocation in sam_account_ok.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_sam.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index a2634feb6c..26b45e47e5 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -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; |