summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-04-25 09:32:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:41 -0500
commit0ecd719499c8c379fc5de53512a702e987679336 (patch)
tree6243bae8e09a85204ec2371e7065ad0d67d8590d /source3/groupdb
parent3dff331a1d50f2e83e2fd87ee6b1df3106d5cda7 (diff)
downloadsamba-0ecd719499c8c379fc5de53512a702e987679336.tar.gz
samba-0ecd719499c8c379fc5de53512a702e987679336.tar.bz2
samba-0ecd719499c8c379fc5de53512a702e987679336.zip
r22509: Fix some memory corruption caused by calling free()
on talloc()'d memory when adding/removing members from Local Groups. (This used to be commit bade93ef9d810824e0fe332e85f21e50b03e403d)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_tdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index 255ac9a5e5..2461ece1d6 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -455,11 +455,11 @@ static BOOL is_aliasmem(const DOM_SID *alias, const DOM_SID *member)
for (i=0; i<num; i++) {
if (sid_compare(alias, &sids[i]) == 0) {
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
return True;
}
}
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
return False;
}
@@ -622,7 +622,7 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
}
if (!found) {
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
return NT_STATUS_MEMBER_NOT_IN_ALIAS;
}
@@ -641,7 +641,7 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
member_string = SMB_STRDUP("");
if (member_string == NULL) {
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
return NT_STATUS_NO_MEMORY;
}
@@ -653,7 +653,7 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
SAFE_FREE(s);
if (member_string == NULL) {
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
return NT_STATUS_NO_MEMORY;
}
}
@@ -663,7 +663,7 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
result = tdb_store_bystring(tdb, key, dbuf, 0) == 0 ?
NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
- SAFE_FREE(sids);
+ TALLOC_FREE(sids);
SAFE_FREE(member_string);
return result;