[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Wed Jun 30 01:19:09 MDT 2010


The branch, master has been updated
       via  6abfe89... s4:schema/schema_set.c - free LDB message diffs
       via  2821abe... s4:auth/session.c - free "group_string" when not needed
      from  32b8b40... s4:dsdb Fix possible schema segfaults for DRS-replication based schema

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6abfe8904a1024512c0ea8bb4844e4409e8d994b
Author: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
Date:   Thu Jun 24 20:48:07 2010 +0300

    s4:schema/schema_set.c - free LDB message diffs
    
    Especially the "free"s after "ldb_msg_diff" are very important since the diff
    message is allocated on the long-living LDB context.
    
    Signed-off-by: Matthias Dieter Wallnöfer <mdw at samba.org>

commit 2821abee1f85c5d9a191a9880808b7022ac2e0b1
Author: Anatoliy Atanasov <anatoliy.atanasov at postpath.com>
Date:   Thu Jun 24 20:48:07 2010 +0300

    s4:auth/session.c - free "group_string" when not needed
    
    Signed-off-by: Matthias Dieter Wallnöfer <mdw at samba.org>

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

Summary of changes:
 source4/auth/session.c           |    2 +-
 source4/dsdb/schema/schema_set.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/session.c b/source4/auth/session.c
index 29ba13e..1be9874 100644
--- a/source4/auth/session.c
+++ b/source4/auth/session.c
@@ -178,7 +178,7 @@ _PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
 
 		group_dn = talloc_asprintf(tmp_ctx, "<SID=%s>", group_string);
 		NT_STATUS_HAVE_NO_MEMORY_AND_FREE(group_dn, server_info);
-
+		talloc_free(group_string);
 		group_blob = data_blob_string_const(group_dn);
 
 		/* This function takes in memberOf values and expands
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 0e04f5b..b5d8ae4 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -140,6 +140,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
 		if (mod_msg->num_elements > 0) {
 			ret = dsdb_replace(ldb, mod_msg, 0);
 		}
+		talloc_free(mod_msg);
 	}
 
 	if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
@@ -168,6 +169,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem
 		if (mod_msg->num_elements > 0) {
 			ret = dsdb_replace(ldb, mod_msg, 0);
 		}
+		talloc_free(mod_msg);
 	}
 	if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) {
 		/* We might be on a read-only DB */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list