diff options
author | Dan Sledz <dsledz@isilon.com> | 2009-02-08 11:40:26 -0800 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2009-02-11 19:39:14 -0800 |
commit | 4e69f23857289bd58f4adad85602c8afc3bed03a (patch) | |
tree | d9364dc10bde18f96092d88c126c5598bad1fe30 /source3/auth | |
parent | 989944f8e9a27515c80ade8f1670c80d80b472a4 (diff) | |
download | samba-4e69f23857289bd58f4adad85602c8afc3bed03a.tar.gz samba-4e69f23857289bd58f4adad85602c8afc3bed03a.tar.bz2 samba-4e69f23857289bd58f4adad85602c8afc3bed03a.zip |
Fix double free caused by incorrect talloc_steal usage.
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index e3677c41a4..502d06fad3 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -573,8 +573,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, } result->sam_account = sampass; - /* Ensure that the sampass will be freed with the result */ - talloc_steal(result, sampass); result->unix_name = pwd->pw_name; /* Ensure that we keep pwd->pw_name, because we will free pwd below */ talloc_steal(result, pwd->pw_name); @@ -665,6 +663,8 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info, pdb_get_username(sampass), result->unix_name)); *server_info = result; + /* Ensure that the sampass will be freed with the result */ + talloc_steal(result, sampass); return NT_STATUS_OK; } |