The branch, v3-2-test has been updated
       via  9aeca67cbeb1a04082b02d54150d042a7b5a241d (commit)
      from  0bd5253c05530b25aa9261019ef028728a8f9c75 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 9aeca67cbeb1a04082b02d54150d042a7b5a241d
Author: Dan Sledz <dsl...@isilon.com>
Date:   Thu Feb 12 12:01:16 2009 -0800

    Fix double free caused by incorrect talloc_steal usage.

-----------------------------------------------------------------------

Summary of changes:
 source/auth/auth_util.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index a183afb..2f9cfa3 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -565,8 +565,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
        }
 
        result->sam_account = sampass;
-       /* Ensure thaat 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);
@@ -650,6 +648,8 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
                 pdb_get_username(sampass), result->unix_name));
 
        *server_info = result;
+       /* Ensure thaat the sampass will be freed with the result */
+       talloc_steal(result, sampass);
 
        return NT_STATUS_OK;
 }


-- 
Samba Shared Repository

Reply via email to